Consider a and p, two permutations of length n. Initially, a_i=p_i=i for all 1≤i≤n. Let A be a sequence of permutations such that A_1=a and A_i,j=A_i−1,p_j for all i≥1 and 1≤j≤n.
There are three types of operations, where x and y are positive integers:
swap_a x y: swap a_x and a_y, where 1≤x,y≤n;swap_p x y: swap p_x and p_y, where 1≤x,y≤n;cmp x y: compare A_x with A_y lexicographically.For each operation of type 3, output the relationship between A_x and A_y. A permutation s is lexicographically smaller than a permutation t if and only if there exists an index i such that s_i\<t_i and s_j=t_j for all 1≤j\<i.
There are multiple test cases. The first line of input contains an integer T (1≤T≤105), the number of test cases. For each test case:
The first line contains an integer n and q (1≤n,q≤105), the length of the permutations and the number of operations.
Each of the following q lines contains one string f and two integers x and y representing an operation. The string f is one of "swap_a", "swap_p", and "cmp". If f is "swap_a" or "swap_p" then 1≤x,y≤n. If f is "cmp" then 1≤x,y≤1018.
It is guaranteed that both the sum of n and the sum of q over all tests do not exceed 105.
For each test case:
For each query, output "<" if A_x is lexicographically smaller than A_y; output ">" if A_x is lexicographically greater than A_y (in other words, A_y is lexicographically smaller than A_x); output "=" if A_x=A_y.