human
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.
 Can you provide a Python program to print the result of the comparison of the given two numbers?
assistant
#Here is Python program to print the result of the comparison of the given two numbers.

import math
import math as m
def L():
    return list(map(int, input().split()))
def I():
    return int(input())
def M():
    return map(int, input().split())
# def sortzip(arr1,arr2,ForS):
#     return sorted(zip(arr1,arr2), key=lambda x:x[ForS])
from math import sqrt
from itertools import count, islice

def is_prime(n):
    return n > 1 and all(n % i for i in islice(count(2), int(sqrt(n) - 1)))

def solve():
    a,b = M()
    c,d = M()

    if len(str(a)) + b > len(str(c)) + d:
        print(">")
        return
    elif len(str(a)) + b < len(str(c)) + d:
        print("<")
        return
    else:
        m  =len(str(a))
        n = len(str(c))
        if m == n:
            if a > c:
                print(">")
                return
            elif a < c:
                print("<")
                return
            else:
                print("=")

                return
        if m > n:
            c *= 10**(m-n)
            # print(len(str(a)), len(str(c)))
            if a > c:
                print(">")
                return
            elif a < c:
                print("<")
                return
            else:
                print("=")
                return
        elif m < n:
            a *= 10**(n-m)
            # print(len(str(a)), len(str(c)))
            if a > c:
                print(">")
                return
            elif a < c:
                print("<")
                return
            else:
                print("=")
                return
for _ in range(I()):
    solve()