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.
The above is tricky. Write me a correct solution in PYTHON3.

=====
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
def primes():
    def is_odd_prime(n):
        if n % 3 == 0: return False
        i, w = 5, 2
        while i * i <= n:
            if n % i == 0: return False
            i += w
            w = 6 - w
        return True

    n, w = 5, 2
    yield from (2, 3, n)
    while True:
        n += w
        if n < 25 or is_odd_prime(n): yield n
        w = 6 - w

def prime_facts(n):
    for p in primes():
        if n < p * p: break
        t = n
        while t % p == 0:
            t //= p
            yield p

def facts(n):
    dd, tt = [1], []
    for p in primes():
        if n < p * p: break
        t, e = n, 1
        while t % p == 0:
            tt += [d * p ** e for d in dd]
            t //= p
            e += 1
        if e > 1:
            dd += tt
            del tt[:]
    if n != dd[-1]:
        dd += [n // d for d in dd]
    return dd
'''

t = int(input())
for i in range(t):
    s = input().split()
    a = s[0]
    b = int(s[1])
    s2 = input().split()
    a2 = s2[0]
    b2 = int(s2[1])
    if len(a) > len(a2):
        d = len(a) - len(a2)
        a2 += '0' * d
        b2 =b2 - d
    elif len(a) < len(a2):
        d = len(a2) - len(a)
        a += '0' * (d)
        b = b - (d)
    a = int(a)
    a2 = int(a2)
    if a > a2:
        if b > b2:
            print('>')
        elif b < b2:
            print('<')
        elif b == b2:
            print('>')
    elif a < a2:
        if b > b2:
            print('>')
        elif b < b2:
            print('<')
        elif b == b2:
            print('<')
    elif a == a2:
        if b == b2:
            print('=')
        elif b > b2:
            print('>')
        elif b < b2:
            print('<')