PivotOJ

Elapid Errands

시간 제한: 11000ms메모리 제한: 1024MB출처: NCPC 2024BOJ 32553

문제

Carl the snake is in his burrow at the point (0,0)(0,0) in an infinite plane. He wants to visit the points (x1,y1),(x2,y2),,(xN,yN)(x_1, y_1), (x_2, y_2), \dots, (x_N, y_N). These points must be visited in the order they are given, and Carl must end up at the point (xN,yN)(x_N, y_N). In one move, he can move one step up, down, left, or right. However, since he is a very long snake, he can never visit the same point more than once.

Your task is to find a sequence of moves such that Carl visits all the points in order, and never visits any point more than once. The points (xi,yi)(x_i, y_i) were generated uniformly at random.

입력

The first line contains one integer NN (1N201 \leq N \leq 20), the number of points you must visit.

The following NN lines each contain two integers xi,yix_i, y_i (0xi,yi1040 \leq x_i, y_i \leq 10^4).

Apart from the sample, there will be 100100 testcases, all with N=20N = 20. The (manhattan) distance between any two of the points (including the starting point (0,0)(0,0)) will be at least 2020. Within these constraints, the points (xi,yi)(x_i, y_i) were generated uniformly at random.

Note that the sample does not satisfy the distance requirement. Your solution does not need to solve the sample to get accepted.

출력

Print a string consisting of the characters '<', '>', '^', 'v'. This is the list of moves you should make so that you visit all the points in order without ever going to the same point more than once. The string must have length at most 21062 \cdot 10^6.

예제

예제 1

입력
2
0 10
5 0
출력
^^^^^^^^^^>>vvv>v>vvv<vvv>>
이 문제는 채점 준비 중입니다. 테스트 데이터가 확보되면 제출이 가능합니다.