human
PYTHON3 solution for "Monocarp wrote down two numbers on a whiteboard. Both numbers follow a specific format: a positive integer x with p zeros appended to its end.

Now Monocarp asks you to compare these two numbers. Can you help him?

Input

The first line contains a single integer t (1 ≤ t ≤ 10^4) — the number of testcases.

The first line of each testcase contains two integers x_1 and p_1 (1 ≤ x_1 ≤ 10^6.
0 ≤ p_1 ≤ 10^6) — the description of the first number.

The second line of each testcase contains two integers x_2 and p_2 (1 ≤ x_2 ≤ 10^6.
0 ≤ p_2 ≤ 10^6) — the description of the second number.

Output

For each testcase print the result of the comparison of the given two numbers. If the first number is smaller than the second one, print '<'. If the first number is greater than the second one, print '>'. If they are equal, print '='.

Example

Input

5
2 1
19 0
10 2
100 1
1999 0
2 3
1 0
1 0
99 0
1 2

Output

&gt;
=
&lt;
=
&lt;

Note

The comparisons in the example are: 20 > 19, 1000 = 1000, 1999 < 2000, 1 = 1, 99 < 100.":


 Give me a Python code to print the result of the comparison of the given two numbers?
assistant
#Here is Python code to print the result of the comparison of the given two numbers.
 def solve_test():
    x1, p1 = map(int, input().split())
    x2, p2 = map(int, input().split())
    minimum = min(p1, p2)
    p1 -= minimum
    p2 -= minimum
    if p1 >= 7:
        return ">"
    if p2 >= 7:
        return "<"
    for _ in range(p1):
        x1 *= 10
    for _ in range(p2):
        x2 *= 10
    if x1 < x2:
        return "<"
    elif x1 > x2:
        return ">"
    else:
        return "="

def main():
    tests = int(input())
    for _ in range(tests):
        answer = solve_test()
        print(answer)

if __name__ == "__main__":
    main()