399_A. Pages_36731
User ainta is making a web site. This time he is going to make a navigation of the pages. In his site, there are n pages numbered by integers from 1 to n. Assume that somebody is on the p-th page now. The navigation will look like this:

<< p - k p - k + 1 ... p - 1 (p) p + 1 ... p + k - 1 p + k >>

When someone clicks the button "<<" he is redirected to page 1, and when someone clicks the button ">>" he is redirected to page n. Of course if someone clicks on a number, he is redirected to the corresponding page.

There are some conditions in the navigation:

  * If page 1 is in the navigation, the button "<<" must not be printed. 
  * If page n is in the navigation, the button ">>" must not be printed. 
  * If the page number is smaller than 1 or greater than n, it must not be printed. 



You can see some examples of the navigations. Make a program that prints the navigation.

Input

The first and the only line contains three integers n, p, k (3 ≤ n ≤ 100; 1 ≤ p ≤ n; 1 ≤ k ≤ n)

Output

Print the proper navigation. Follow the format of the output from the test samples.

Examples

Input

17 5 2


Output

&lt;&lt; 3 4 (5) 6 7 &gt;&gt; 

Input

6 5 2


Output

&lt;&lt; 3 4 (5) 6 

Input

6 1 2


Output

(1) 2 3 &gt;&gt; 

Input

6 2 2


Output

1 (2) 3 4 &gt;&gt;

Input

9 6 3


Output

&lt;&lt; 3 4 5 (6) 7 8 9

Input

10 6 3


Output

&lt;&lt; 3 4 5 (6) 7 8 9 &gt;&gt;

Input

8 5 4


Output

1 2 3 4 (5) 6 7 8 
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt(); //страницы все
		int p = scanner.nextInt(); //данная страница
		int k = scanner.nextInt();
		if ((p - k) > 1) {
			System.out.print("<< ");
		}
		int l = p - k;
		int m = p + k;
		for (int i = l; i < m + 1; i++) {
			if ((i == p) && (i > 0)) {
				System.out.print("(" + i + ") ");
				if (i == n) {
					break;
				}
			}
			if ((i != p) && (i > 0) && (i != n)) {
					System.out.print(i + " ");
			}
			if ((i == n)){
					System.out.print(i + " ");
					break;
			}
		}
			if ((p + k) < n) {
				System.out.println(">>");
			}
		}
	}

6 5 2
 6 1 2
 8 5 4
 6 2 2
 9 6 3
 17 5 2
 10 6 3
 79 35 12
 100 46 48
 7 5 1
 100 46 38
 6 1 2
 17 5 2
 6 2 2
 100 10 20
 100 100 17
 3 1 3
 100 99 15
 100 99 5
 9 6 3
 10 6 3
 17 5 3
 3 1 1
 5 2 1
 6 5 2
 5 3 1
 100 25 11
 100 10 100
 5 5 5
 3 2 1
 5 3 5
 100 35 28
 79 44 12
 100 45 48
 10 5 1
 100 46 18
 6 1 3
 17 10 3
 6 2 1
 4 1 3
 9 5 3
 100 24 11
 6 3 1
 100 35 41
 6 5 3
 6 1 1
 8 5 8
 6 3 2
 9 8 3
 17 7 2
 16 6 3
 79 47 12
 100 45 21
 10 7 1
 100 14 18
 17 8 3
 18 5 5
 100 24 3
 6 4 1
 100 26 41
 6 1 4
 9 3 3
 79 72 12
 100 17 18
 4 1 2
 17 8 4
 15 5 6
 9 3 4
 79 72 9
 100 17 36
 4 2 2
 12 9 5
 3 3 2
 9 6 4
 79 29 9
 100 3 36
 18 8 8
 12 10 5
 9 6 8
 79 29 8
 4 4 4
 18 4 8
 26 9 5
 9 6 1
 79 6 8
 46 9 9
 46 9 17
 17 14 1
 79 15 8
 46 1 17
 17 9 1
 79 14 8
 79 14 7
 79 12 7
 18 5 3
 4 1 4
 8 2 1
 4 1 1
 15 5 3
 12 3 2
 26 7 2
 16 5 3
 17 7 1
 5 1 1
 12 5 5
 23 3 2
 16 5 1
 18 8 4
 10 1 1
 15 5 5
 4 2 4
 26 5 5
 9 6 7
 79 4 8
 46 9 5
 9 7 1
 79 8 8
 11 9 1

<< 3 4 (5) 6 
 (1) 2 3  >>
 1 2 3 4 (5) 6 7 8 
 1 (2) 3 4  >>
 << 3 4 5 (6) 7 8 9 
 << 3 4 (5) 6 7  >>
 << 3 4 5 (6) 7 8 9  >>
 << 23 24 25 26 27 28 29 30 31 32 33 34 (35) 36 37 38 39 40 41 42 43 44 45 46 47  >>
 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 (46) 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94  >>
 << 4 (5) 6  >>
 << 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 (46) 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84  >>
 (1) 2 3  >>
 << 3 4 (5) 6 7  >>
 1 (2) 3 4  >>
 1 2 3 4 5 6 7 8 9 (10) 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30  >>
 << 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 (100) 
 (1) 2 3 
 << 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 (99) 100 
 << 94 95 96 97 98 (99) 100 
 << 3 4 5 (6) 7 8 9 
 << 3 4 5 (6) 7 8 9  >>
 << 2 3 4 (5) 6 7 8  >>
 (1) 2  >>
 1 (2) 3  >>
 << 3 4 (5) 6 
 << 2 (3) 4  >>
 << 14 15 16 17 18 19 20 21 22 23 24 (25) 26 27 28 29 30 31 32 33 34 35 36  >>
 1 2 3 4 5 6 7 8 9 (10) 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 
 1 2 3 4 (5) 
 1 (2) 3 
 1 2 (3) 4 5 
 << 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 (35) 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63  >>
 << 32 33 34 35 36 37 38 39 40 41 42 43 (44) 45 46 47 48 49 50 51 52 53 54 55 56 >>
 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 (45) 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 >>
 << 4 (5) 6 >>
 << 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 (46) 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 >>
 (1) 2 3 4 >>
 << 7 8 9 (10) 11 12 13 >>
 1 (2) 3 >>
 (1) 2 3 4
 << 2 3 4 (5) 6 7 8 >>
 << 13 14 15 16 17 18 19 20 21 22 23 (24) 25 26 27 28 29 30 31 32 33 34 35 >>
 << 2 (3) 4 >>
 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 (35) 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 >>
 << 2 3 4 (5) 6
 (1) 2 >>
 1 2 3 4 (5) 6 7 8
 1 2 (3) 4 5 >>
 << 5 6 7 (8) 9
 << 5 6 (7) 8 9 >>
 << 3 4 5 (6) 7 8 9 >>
 << 35 36 37 38 39 40 41 42 43 44 45 46 (47) 48 49 50 51 52 53 54 55 56 57 58 59 >>
 << 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 (45) 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 >>
 << 6 (7) 8 >>
 1 2 3 4 5 6 7 8 9 10 11 12 13 (14) 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 >>
 << 5 6 7 (8) 9 10 11 >>
 1 2 3 4 (5) 6 7 8 9 10 >>
 << 21 22 23 (24) 25 26 27 >>
 << 3 (4) 5 >>
 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 (26) 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 >>
 (1) 2 3 4 5 >>
 1 2 (3) 4 5 6 >>
 << 60 61 62 63 64 65 66 67 68 69 70 71 (72) 73 74 75 76 77 78 79
 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 (17) 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 >>
 (1) 2 3 >>
 << 4 5 6 7 (8) 9 10 11 12 >>
 1 2 3 4 (5) 6 7 8 9 10 11 >>
 1 2 (3) 4 5 6 7 >>
 << 63 64 65 66 67 68 69 70 71 (72) 73 74 75 76 77 78 79
 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 (17) 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 >>
 1 (2) 3 4
 << 4 5 6 7 8 (9) 10 11 12
 1 2 (3)
 << 2 3 4 5 (6) 7 8 9
 << 20 21 22 23 24 25 26 27 28 (29) 30 31 32 33 34 35 36 37 38 >>
 1 2 (3) 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 >>
 1 2 3 4 5 6 7 (8) 9 10 11 12 13 14 15 16 >>
 << 5 6 7 8 9 (10) 11 12
 1 2 3 4 5 (6) 7 8 9
 << 21 22 23 24 25 26 27 28 (29) 30 31 32 33 34 35 36 37 >>
 1 2 3 (4)
 1 2 3 (4) 5 6 7 8 9 10 11 12 >>
 << 4 5 6 7 8 (9) 10 11 12 13 14 >>
 << 5 (6) 7 >>
 1 2 3 4 5 (6) 7 8 9 10 11 12 13 14 >>
 1 2 3 4 5 6 7 8 (9) 10 11 12 13 14 15 16 17 18 >>
 1 2 3 4 5 6 7 8 (9) 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 >>
 << 13 (14) 15 >>
 << 7 8 9 10 11 12 13 14 (15) 16 17 18 19 20 21 22 23 >>
 (1) 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 >>
 << 8 (9) 10 >>
 << 6 7 8 9 10 11 12 13 (14) 15 16 17 18 19 20 21 22 >>
 << 7 8 9 10 11 12 13 (14) 15 16 17 18 19 20 21 >>
 << 5 6 7 8 9 10 11 (12) 13 14 15 16 17 18 19 >>
 << 2 3 4 (5) 6 7 8 >>
 (1) 2 3 4
 1 (2) 3 >>
 (1) 2 >>
 << 2 3 4 (5) 6 7 8 >>
 1 2 (3) 4 5 >>
 << 5 6 (7) 8 9 >>
 << 2 3 4 (5) 6 7 8 >>
 << 6 (7) 8 >>
 (1) 2 >>
 1 2 3 4 (5) 6 7 8 9 10 >>
 1 2 (3) 4 5 >>
 << 4 (5) 6 >>
 << 4 5 6 7 (8) 9 10 11 12 >>
 (1) 2 >>
 1 2 3 4 (5) 6 7 8 9 10 >>
 1 (2) 3 4
 1 2 3 4 (5) 6 7 8 9 10 >>
 1 2 3 4 5 (6) 7 8 9
 1 2 3 (4) 5 6 7 8 9 10 11 12 >>
 << 4 5 6 7 8 (9) 10 11 12 13 14 >>
 << 6 (7) 8 >>
 1 2 3 4 5 6 7 (8) 9 10 11 12 13 14 15 16 >>
 << 8 (9) 10 >>
