human
PYTHON 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.":
assistant
#Here is Python program to print the result of the comparison of the given two numbers.
 import sys
testing = len(sys.argv) == 4 and sys.argv[3] == "myTest"
interactive = False
if testing:
    cmd = sys.stdout
    from time import time
    start_time = int(round(time() * 1000)) 
    readAll = open(sys.argv[1], 'r').read
    sys.stdout = open(sys.argv[2], 'w')
else:
    readAll = sys.stdin.read

# ############ ---- I/O Functions ---- ############

class InputData:
    def __init__(self):
        self.lines = readAll().split('\n')
        self.n = len(self.lines)
        self.ii = -1
    def input(self):
        self.ii += 1
        assert self.ii < self.n
        return self.lines[self.ii]

flush = sys.stdout.flush
if interactive and not testing:
    input = sys.stdin.readline
else:
    inputData = InputData()
    input = inputData.input

def intin():
    return(int(input()))
def intlin():
    return(list(map(int,input().split())))
def chrin():
    return(list(input()))
def strin():
    return input()
def lout(l, sep="\n", toStr=True):
    print(sep.join(map(str, l) if toStr else l))
def dout(*args, **kargs):
    if not testing: return
    if args: print(args[0] if len(args)==1 else args)
    if kargs: print([(k,v) for k,v in kargs.items()])
def ask(q):
    sys.stdout.write(str(q)+'\n')
    flush()
    return intin()
    
# ############ ---- I/O Functions ---- ############

# from math import ceil
# from collections import defaultdict as ddict, Counter
# from heapq import *
# from Queue import Queue
def l(x):
    return len(str(x))
def main():
    x1,p1 = intlin()
    x2,p2 = intlin()
    if l(x1)+p1 > l(x2)+p2:
        return '>'
    elif l(x1)+p1 < l(x2)+p2:
        return '<'
    if l(x1) > l(x2):
        x2 *= 10**(l(x1)-l(x2))
    elif l(x1) < l(x2):
        x1 *= 10**(l(x2)-l(x1))
    if x1 > x2:
        return '>'
    elif x1 < x2:
        return '<'
    return '='
    

anss = []
for _ in xrange(intin()):
    anss.append(main())
    # anss.append("YES" if main() else "NO")
lout(anss)

if testing:
    sys.stdout = cmd
    print(int(round(time() * 1000))  - start_time)