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 \le t \le 10^4$) — the number of testcases.

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

The second line of each testcase contains two integers $x_2$ and $p_2$ ($1 \le x_2 \le 10^6; 0 \le p_2 \le 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 '='.


-----Examples-----

Input
5
2 1
19 0
10 2
100 1
1999 0
2 3
1 0
1 0
99 0
1 2
Output
>
=
<
=
<


-----Note-----

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

Difficulty: EASY
Tags: Mathematics

Implementation

Starter code:

Solutions:
from sys import stdin, stdout
from collections import defaultdict
input = stdin.readline
from random import randint
import math
import sys
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	while a > 1:
		b += 1
		a = a / 10
	while c > 1:
		c = c / 10
		d = d + 1
	if b < d:
		print('<')
	elif d < b:
		print('>')
	elif a < c:
		print('<')
	elif a > c:
		print('>')
	else:
		print('=')


import math
for _ in range(int(input())):
	(n1, p1) = (int(x) for x in input().split())
	(n2, p2) = (int(x) for x in input().split())
	(d1, d2) = (math.log10(n1) + p1, math.log10(n2) + p2)
	print('=') if abs(d1 - d2) < 1e-07 else print('>') if d1 > d2 else print('<')


import sys
from collections import deque
import math
from bisect import bisect_left
from functools import cmp_to_key

def II():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def MI():
	return map(int, sys.stdin.readline().split())

def SI():
	return sys.stdin.readline().strip()

def FACT(n, mod):
	s = 1
	facts = [1]
	for i in range(1, n + 1):
		s *= i
		s %= mod
		facts.append(s)
	return facts[n]

def C(n, k, mod):
	return FACT(n, mod) * pow(FACT(k, mod) * FACT(n - k, mod) % mod, mod - 2, mod) % mod

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)
t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	(p, r) = map(int, input().split())
	if len(str(a)) + b > len(str(p)) + r:
		print('>')
	elif len(str(a)) + b < len(str(p)) + r:
		print('<')
	else:
		if b >= r:
			b = b - r
			r = 0
		else:
			r = r - b
			b = 0
		if a * 10 ** b > p * 10 ** r:
			print('>')
		elif a * 10 ** b < p * 10 ** r:
			print('<')
		else:
			print('=')


for _ in range(int(input())):
	(a, a1) = input().split()
	(b, b1) = input().split()
	(a, a1) = (int(a), int(a1))
	(b, b1) = (int(b), int(b1))
	minz = min(a1, b1)
	a1 = a1 - minz
	b1 = b1 - minz
	result = '>' if a1 >= 7 else '<' if b1 >= 7 else 0
	if not result:
		a *= 10 ** a1
		b *= 10 ** b1
		result = '>' if a > b else '<' if a < b else '='
	print(result)


n = int(input())
l = []
for i in range(n):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	while p1 != 0 and x1 < 1000000:
		x1 *= 10
		p1 -= 1
	while p2 != 0 and x2 < 1000000:
		x2 *= 10
		p2 -= 1
	if p1 > p2:
		l.append('>')
	elif p1 < p2:
		l.append('<')
	elif p1 == p2:
		if x1 > x2:
			l.append('>')
		elif x1 < x2:
			l.append('<')
		else:
			l.append('=')
for i in l:
	print(i)


t = int(input())
while t:
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if abs(b - d) >= 7:
		if b > d:
			print('>')
		else:
			print('<')
	else:
		if b >= d:
			a = a * 10 ** (b - d)
		else:
			c = c * 10 ** (d - b)
		if a > c:
			print('>')
		elif a == c:
			print('=')
		else:
			print('<')
	t -= 1


n = int(input())
for i in range(n):
	a = list(map(int, input().strip().split()))
	b = list(map(int, input().strip().split()))
	s1 = str(a[0])
	s2 = str(b[0])
	if len(s1) + a[1] > len(s2) + b[1]:
		print('>')
	elif len(s1) + a[1] < len(s2) + b[1]:
		print('<')
	elif len(s1) + a[1] == len(s2) + b[1]:
		m = max(len(s1), len(s2))
		if m == len(s1):
			val = len(s1) - len(s2)
			while val > 0:
				s2 = s2 + '0'
				val = val - 1
		else:
			val = len(s2) - len(s1)
			while val > 0:
				s1 = s1 + '0'
				val = val - 1
		if s1 > s2:
			print('>')
		elif s1 == s2:
			print('=')
		else:
			print('<')


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	m = min(p1, p2)
	p1 = p1 - m
	p2 = p2 - m
	if p1 > 6:
		print('>')
	elif p2 > 6:
		print('<')
	else:
		x = x1 * 10 ** p1
		y = x2 * 10 ** p2
		if x > y:
			print('>')
		elif x < y:
			print('<')
		elif x == y:
			print('=')


for _ in range(int(input())):
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	p1 = int(p1) + len(x1)
	p2 = int(p2) + len(x2)
	if p1 > p2:
		print('>')
		continue
	elif p1 < p2:
		print('<')
		continue
	while len(x1) < len(x2):
		x1 += '0'
	while len(x2) < len(x1):
		x2 += '0'
	x2 = int(x2)
	x1 = int(x1)
	if x1 > x2:
		print('>')
	elif x1 < x2:
		print('<')
	else:
		print('=')


import sys
from math import log
for _ in range(int(sys.stdin.readline())):
	(x1, p1) = map(int, sys.stdin.readline().split())
	(x2, p2) = map(int, sys.stdin.readline().split())
	while x1 % 10 == 0:
		x1 = x1 // 10
		p1 = p1 + 1
	while x2 % 10 == 0:
		x2 = x2 // 10
		p2 = p2 + 1
	a = log(x1, 10)
	b = log(x2, 10)
	if p1 == p2 and x1 == x2:
		print('=')
	elif a + p1 > b + p2:
		print('>')
	else:
		print('<')


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)
main()


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	(a1, a2) = map(str, input().split())
	(b1, b2) = map(str, input().split())
	x = len(a1) + int(a2)
	y = len(b1) + int(b2)
	if x > y:
		print('>')
	elif x < y:
		print('<')
	else:
		greater = True
		ver = False
		for i in range(min(10, x)):
			if i >= len(a1):
				curr_a = 0
			else:
				curr_a = int(a1[i])
			if i >= len(b1):
				curr_b = 0
			else:
				curr_b = int(b1[i])
			if curr_a < curr_b:
				ver = True
				greater = False
				break
			elif curr_a > curr_b:
				ver = True
				break
		if ver:
			if greater:
				print('>')
			else:
				print('<')
		else:
			print('=')


import os
import sys
from bisect import bisect, bisect_left, insort, insort_left
from heapq import heapify, heappop, heappush, nlargest, nsmallest
from io import BytesIO, IOBase
from types import GeneratorType
BUFSIZE: int = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def bootstrap(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc

def modInverse(a, m):
	g = gcd(a, m)
	if g != 1:
		return -1
	else:
		return power(a, m - 2, m)

def power(x, y, m):
	if y == 0:
		return 1
	p = power(x, y // 2, m) % m
	p = p * p % m
	if y % 2 == 0:
		return p
	else:
		return x * p % m

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	ans = set()
	for p in range(2, n + 1):
		if prime[p]:
			ans.add(p)
	return ans
MOD = 1000000007

def main():
	t = int(input())
	for i in range(t):
		temp = list(map(int, input().split()))
		(x1, p1) = (temp[0], temp[1])
		temp = list(map(int, input().split()))
		(x2, p2) = (temp[0], temp[1])
		if x1 == x2 and p1 == p2:
			print('=')
		elif x1 > x2 and p1 > p2:
			print('>')
		elif x1 < x2 and p1 < p2:
			print('<')
		elif x1 == x2 and p1 > p2:
			print('>')
		elif x1 == x2 and p1 < p2:
			print('<')
		elif x1 > x2 and p1 == p2:
			print('>')
		elif x1 < x2 and p1 == p2:
			print('<')
		elif x1 > x2 and p1 < p2:
			zerosNeeded = len(str(x1)) - len(str(x2))
			p2 = p2 - zerosNeeded
			x2 = int(str(x2) + '0' * zerosNeeded)
			if x1 == x2:
				if p1 > p2:
					print('>')
				elif p1 < p2:
					print('<')
				else:
					print('=')
			elif x1 < x2:
				if p1 > p2:
					print('>')
				elif p1 < p2:
					print('<')
				else:
					print('<')
			elif p1 > p2:
				print('>')
			elif p1 < p2:
				print('<')
			else:
				print('>')
		elif x1 < x2 and p1 > p2:
			zerosNeeded = len(str(x2)) - len(str(x1))
			p1 = p1 - zerosNeeded
			x1 = int(str(x1) + '0' * zerosNeeded)
			if x1 == x2:
				if p1 > p2:
					print('>')
				elif p1 < p2:
					print('<')
				else:
					print('=')
			elif x1 < x2:
				if p1 > p2:
					print('>')
				elif p1 < p2:
					print('<')
				else:
					print('<')
			elif p1 > p2:
				print('>')
			elif p1 < p2:
				print('<')
			else:
				print('>')
main()


k = []
for i in range(int(input())):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	if len(str(x1)) + p1 < len(str(x2)) + p2:
		k.append('<')
	elif len(str(x1)) + p1 > len(str(x2)) + p2:
		k.append('>')
	else:
		if p1 > p2:
			s1 = str(x1) + '0' * (p1 - p2)
			s2 = str(x2)
		else:
			s1 = str(x1)
			s2 = str(x2) + '0' * (p2 - p1)
		z = int(s1) - int(s2)
		if z < 0:
			k.append('<')
		elif z > 0:
			k.append('>')
		else:
			k.append('=')
for t in k:
	print(t)


for _ in range(int(input())):
	(a, b) = (input().split(), input().split())
	la = len(a[0])
	lb = len(b[0])
	if la + int(a[1]) < lb + int(b[1]):
		print('<')
	elif la + int(a[1]) > lb + int(b[1]):
		print('>')
	else:
		ml = max(la, lb) - min(la, lb)
		if la < lb:
			a[0] = int(a[0] + '0' * ml)
			b[0] = int(b[0])
		elif la > lb:
			b[0] = int(b[0] + '0' * ml)
			a[0] = int(a[0])
		if a[0] < b[0]:
			print('<')
		elif a[0] > b[0]:
			print('>')
		else:
			print('=')


n = int(input())
for i in range(n):
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	x1 = int(x1)
	x2 = int(x2)
	p1 = int(p1)
	p2 = int(p2)
	if abs(p1 - p2) < 7:
		while p1 != p2:
			if p1 > p2:
				p1 = p1 - 1
				x1 = x1 * 10
			elif p1 < p2:
				p2 = p2 - 1
				x2 = x2 * 10
		if x1 > x2:
			print('>')
		elif x1 == x2:
			print('=')
		else:
			print('<')
	elif p1 > p2:
		print('>')
	elif p1 == p2:
		print('=')
	else:
		print('<')


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('<')


from math import log10, ceil
t = int(input())
for _ in range(t):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	d1 = ceil(log10(x1)) + p1
	d2 = ceil(log10(x2)) + p2
	if d1 > d2:
		print('>')
		continue
	if d1 < d2:
		print('<')
		continue
	d = abs(p1 - p2)
	n1 = x1
	n2 = x2
	if p1 > p2:
		n1 = int(str(x1) + '0' * d)
	else:
		n2 = int(str(x2) + '0' * d)
	if n1 == n2:
		print('=')
		continue
	if n1 > n2:
		print('>')
		continue
	if n1 < n2:
		print('<')


import math
for _ in range(int(input())):
	(a1, b1) = list(map(int, input().split()))
	(a2, b2) = list(map(int, input().split()))
	c = math.log10(a1 / a2) + (b1 - b2)
	if c > 0:
		print('>')
	elif c < 0:
		print('<')
	else:
		print('=')


from sys import stdin, stdout

def input():
	return stdin.readline().strip()

def read_int_list():
	return list(map(int, input().split()))

def read_int_tuple():
	return tuple(map(int, input().split()))

def read_int():
	return int(input())

def ans(t1, p1, t2, p2):
	p = min(p1, p2)
	p1 -= p
	p2 -= p
	if p1 > 15:
		return '>'
	if p2 > 15:
		return '<'
	t1 *= 10 ** p1
	t2 *= 10 ** p2
	if t1 > t2:
		return '>'
	if t1 < t2:
		return '<'
	return '='
for _ in range(read_int()):
	(t1, p1) = read_int_tuple()
	(t2, p2) = read_int_tuple()
	print(ans(t1, p1, t2, p2))


for _ in range(int(input())):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	p1 += len(str(x1))
	p2 += len(str(x2))
	if p1 == p2:
		(p1, p2) = (x1 / 10 ** len(str(x1)), x2 / 10 ** len(str(x2)))
	if p1 == p2:
		print('=')
	elif p1 < p2:
		print('<')
	else:
		print('>')


t = int(input())
for i in range(t):
	(a1, a2) = input().split()
	(b1, b2) = input().split()
	if len(a1) + int(a2) > len(b1) + int(b2):
		print('>')
	elif len(a1) + int(a2) < len(b1) + int(b2):
		print('<')
	else:
		while len(a1) > len(b1):
			b1 += '0'
		while len(a1) < len(b1):
			a1 += '0'
		if a1 > b1:
			print('>')
		elif a1 < b1:
			print('<')
		else:
			print('=')


def resul(a, b, c, d):
	while a // 10 != 0:
		a = a / 10
		b = b + 1
	while c // 10 != 0:
		c = c / 10
		d = d + 1
	if b > d:
		print('>')
	elif b == d:
		if a > c:
			print('>')
		elif a == c:
			print('=')
		else:
			print('<')
		y = c
	else:
		print('<')
n = int(input())
i = 0
while i < n:
	(a, b) = map(int, input().split(' '))
	(c, d) = map(int, input().split(' '))
	resul(a, b, c, d)
	i = i + 1


import heapq
import sys
import math
from collections import deque
from bisect import bisect_left, bisect_right
I = sys.stdin.readline
II = lambda : int(I())
IN = lambda x: map(int, x.split())
FN = lambda x: map(float, x.split())
L = lambda x: list(IN(x))
M = 1000000007
P = print
T = True
F = False
for _ in range(II()):
	(x1, p1) = IN(I())
	(x2, p2) = IN(I())
	p = p1 - p2
	if p == 0:
		if x1 > x2:
			print('>')
		elif x1 < x2:
			print('<')
		else:
			print('=')
		continue
	if x1 > x2 and p > 0:
		print('>')
		continue
	if x1 < x2 and p < 0:
		print('<')
		continue
	a = max(x1, x2)
	b = min(x1, x2)
	pp = abs(p)
	f = True
	while pp > 0:
		if b > a:
			break
		b *= 10
		pp -= 1
	if b == a:
		print('=')
	if b > a:
		if p > 0:
			print('>')
		else:
			print('<')
	if b < a:
		if p < 0:
			print('>')
		else:
			print('<')


z = int(input())

def func():
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	mn = min(p1, p2)
	p1 -= mn
	p2 -= mn
	if p1 >= 7:
		print('>')
	elif p2 >= 7:
		print('<')
	else:
		x1 = x1 * 10 ** p1
		x2 = x2 * 10 ** p2
		if x1 < x2:
			print('<')
		elif x1 > x2:
			print('>')
		else:
			print('=')
for i in range(z):
	func()


from sys import stdin
for _ in range(int(stdin.readline())):
	(x1, p1) = stdin.readline().split()
	(x2, p2) = stdin.readline().split()
	p1 = int(p1)
	p2 = int(p2)
	l1 = len(x1) + p1
	l2 = len(x2) + p2
	if l1 > l2:
		print('>')
	elif l1 < l2:
		print('<')
	else:
		while len(x1) < len(x2):
			x1 += '0'
			p1 -= 1
		while len(x2) < len(x1):
			x2 += '0'
			p2 -= 1
		x1 = int(x1)
		x2 = int(x2)
		if x1 > x2:
			print('>')
		elif x1 < x2:
			print('<')
		else:
			print('=')


import os
import sys
from collections import defaultdict, deque
from io import BytesIO, IOBase

def main():
	for _ in range(int(input())):
		(a, b) = input().split()
		(c, d) = input().split()
		t = len(a) + int(b)
		g = len(c) + int(d)
		if t > g:
			print('>')
		elif t < g:
			print('<')
		else:
			m = max(len(a), len(c))
			l = a + '0' * (m - len(a))
			g = c + '0' * (m - len(c))
			if int(l) > int(g):
				print('>')
			elif int(l) < int(g):
				print('<')
			else:
				print('=')
main()


n = int(input())
ans = [0 for _ in range(n)]
for i in range(n):
	count = 1
	(a1, b1) = input().split()
	(c1, d1) = input().split()
	(len1, len2) = (len(a1), len(c1))
	if len1 + int(b1) < len2 + int(d1):
		ans[i] = '<'
		continue
	elif len1 + int(b1) > len2 + int(d1):
		ans[i] = '>'
		continue
	if len1 > len2:
		c1 = c1 + '0' * (len1 - len2)
	if len1 < len2:
		a1 = a1 + '0' * (len2 - len1)
	lens = len(a1)
	for j in range(lens):
		if int(a1[j]) == int(c1[j]):
			continue
		if int(a1[j]) < int(c1[j]):
			ans[i] = '<'
			count = 0
			break
		if int(a1[j]) > int(c1[j]):
			ans[i] = '>'
			count = 0
			break
	if count:
		ans[i] = '='
for i in range(n):
	print(ans[i])


def comp(x1, x2):
	if len(x1) > len(x2):
		x2 += '0' * (len(x1) - len(x2))
	elif len(x1) < len(x2):
		x1 += '0' * (len(x2) - len(x1))
	if int(x1) > int(x2):
		return '>'
	elif int(x1) < int(x2):
		return '<'
	else:
		return '='
t = int(input())
for _ in range(t):
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	if len(x1) + int(p1) > len(x2) + int(p2):
		print('>')
	elif len(x1) + int(p1) < len(x2) + int(p2):
		print('<')
	else:
		print(comp(x1, x2))


t = int(input())
for _ in range(t):
	(x1, p1) = [i for i in input().split()]
	(x2, p2) = [i for i in input().split()]
	p1 = int(p1) + len(x1)
	p2 = int(p2) + len(x2)
	x1 = float('0.' + x1)
	x2 = float('0.' + x2)
	if p1 > p2:
		ans = '>'
	elif p1 < p2:
		ans = '<'
	elif x1 > x2:
		ans = '>'
	elif x1 < x2:
		ans = '<'
	else:
		ans = '='
	print(ans)


for t in range(int(input())):
	(p1, x1) = [int(x) for x in input().split()]
	(p2, x2) = [int(x) for x in input().split()]
	s1 = str(p1)
	s2 = str(p2)
	l1 = len(s1) + x1
	l2 = len(s2) + x2
	if l1 > l2:
		print('>')
	elif l1 < l2:
		print('<')
	elif l1 == l2:
		st1 = str(p1)
		st2 = str(p2)
		if len(st1) < len(st2):
			total = len(st2) - len(st1)
			for i in range(total):
				st1 = st1 + '0'
		else:
			total = len(st1) - len(st2)
			for i in range(total):
				st2 = st2 + '0'
		flag = 0
		for k in range(len(st1)):
			if st1[k] < st2[k]:
				print('<')
				flag = 1
				break
			elif st1[k] > st2[k]:
				flag = 1
				print('>')
				break
		if flag == 0:
			print('=')


import math
t = int(input())
for q in range(0, t):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	digitx = int(math.log10(x1)) + 1
	digity = int(math.log10(x2)) + 1
	ans = '`'
	if digitx + p1 > digity + p2:
		ans = '>'
	elif digitx + p1 < digity + p2:
		ans = '<'
	elif p1 == p2:
		if x1 > x2:
			ans = '>'
		elif x1 < x2:
			ans = '<'
		else:
			ans = '='
	else:
		(temp1, temp2, cnt) = (-1, -1, -1)
		if digitx > digity:
			cnt = digitx - digity
			res = 1
			res = pow(10, cnt)
			x2 *= res
			if x1 > x2:
				ans = '>'
			elif x1 < x2:
				ans = '<'
			else:
				ans = '='
		else:
			cnt = digity - digitx
			res = 1
			res = pow(10, cnt)
			x1 *= res
			if x1 > x2:
				ans = '>'
			elif x1 < x2:
				ans = '<'
			else:
				ans = '='
	print(ans)


t = int(input())
for i in range(t):
	(num1, z1) = input().split(' ')
	(num2, z2) = input().split(' ')
	mini = min(int(z1), int(z2))
	z1 = int(z1) - mini
	z2 = int(z2) - mini
	if z2 == 0:
		while len(num1) <= len(num2) and z1 != 0:
			num1 = num1 + '0'
			z1 -= 1
	elif z1 == 0:
		while len(num2) <= len(num1) and z2 != 0:
			num2 = num2 + '0'
			z2 -= 1
	if int(num1) > int(num2):
		print('>')
	elif int(num1) < int(num2):
		print('<')
	else:
		print('=')


import sys

def getres(x1, x2, p1, p2):
	l1 = len(x1) + p1
	l2 = len(x2) + p2
	if l1 > l2:
		return '>'
	elif l1 < l2:
		return '<'
	else:
		i = 0
		while i < max(len(x1), len(x2)):
			if i >= len(x1):
				(f, s) = ('0', x2[i])
			elif i >= len(x2):
				(f, s) = (x1[i], '0')
			else:
				(f, s) = (x1[i], x2[i])
			if f > s:
				return '>'
			elif s > f:
				return '<'
			i += 1
	return '='
n = int(sys.stdin.readline())
for i in range(n):
	(x1, p1) = map(int, sys.stdin.readline().split())
	(x2, p2) = map(int, sys.stdin.readline().split())
	sys.stdout.write(getres(str(x1), str(x2), p1, p2) + '\n')


def solve():
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	a = len(str(x1))
	b = len(str(x2))
	if a + p1 != b + p2:
		if a + p1 > b + p2:
			print('>')
		else:
			print('<')
		return
	mn = min(p1, p2)
	p1 -= mn
	p2 -= mn
	x1 = x1 * 10 ** p1
	x2 = x2 * 10 ** p2
	if x1 > x2:
		print('>')
	elif x1 < x2:
		print('<')
	else:
		print('=')
for _ in range(int(input())):
	solve()


for _ in range(int(input())):
	(x, p) = map(int, input().split())
	(y, q) = map(int, input().split())
	if x < y:
		while x < y:
			x *= 10
			p -= 1
	else:
		while x > y:
			y *= 10
			q -= 1
	if x == y:
		if p == q:
			print('=')
		elif p < q:
			print('<')
		else:
			print('>')
	if x > y:
		if p >= q:
			print('>')
		else:
			print('<')
	if x < y:
		if p <= q:
			print('<')
		else:
			print('>')


ll = lambda : map(int, input().split())
t = lambda : int(input())
ss = lambda : input()
lx = lambda x: map(int, input().split(x))
yy = lambda : print('YES')
nn = lambda : print('NO')
from math import log10, log2, ceil, factorial as fac, gcd, inf, sqrt, log
from bisect import bisect_right as br, bisect_left as bl, insort
from collections import Counter
mod = 10 ** 9 + 7

def Nprime(n):
	if n == 2 or n == 3:
		return 0
	if n == 1:
		return 1
	i = 2
	while i * i <= n:
		if n % i == 0:
			return 1
		i += 1
	return 0

def sum_(a, n):
	d = 4
	s = n * (2 * a + (n - 1) * d) // 2
	return s

def aux(x, y):
	if x == 'a' and y == 'z':
		return 1
	if y == 'a' and x == 'z':
		return 1
	return abs(ord(x) - ord(y))

def aux1(x, y):
	if x == 'a' and y == 'z':
		return 1
	if y == 'z' and x == 'a':
		return 1
	return ord('z') - ord(y) + ord(x) - ord('a')
for _ in range(t()):
	(a, b) = ll()
	(c, d) = ll()
	(x, y) = (str(a), str(c))
	if len(x) + b > len(y) + d:
		print('>')
	elif len(x) + b < len(y) + d:
		print('<')
	else:
		if b > d:
			x = x + '0' * (b - d)
		elif d > b:
			y = y + '0' * (d - b)
		if int(x) > int(y):
			print('>')
		elif int(y) > int(x):
			print('<')
		else:
			print('=')


t = int(input())
for _ in range(t):
	(x1, y1) = input().split()
	(x2, y2) = input().split()
	if len(x1) + int(y1) < len(x2) + int(y2):
		print('<')
	elif len(x1) + int(y1) > len(x2) + int(y2):
		print('>')
	else:
		diff = int(y1) - int(y2)
		if diff > 0:
			if int(x1) * 10 ** diff < int(x2):
				print('<')
			elif int(x1) * 10 ** diff > int(x2):
				print('>')
			else:
				print('=')
		if diff <= 0:
			diff = abs(diff)
			if int(x1) < int(x2) * 10 ** diff:
				print('<')
			elif int(x1) > int(x2) * 10 ** diff:
				print('>')
			else:
				print('=')


T = int(input())
for _ in range(T):
	(x, px) = map(int, input().split())
	(y, py) = map(int, input().split())
	while x < 1000000.0:
		x *= 10
		px -= 1
	while y < 1000000.0:
		y *= 10
		py -= 1
	if px > py:
		print('>')
	elif px < py:
		print('<')
	elif x > y:
		print('>')
	elif x < y:
		print('<')
	else:
		print('=')


n = int(input())
for _ in range(n):
	(no1, pow1) = map(int, input().split())
	(no2, pow2) = map(int, input().split())
	while no1 >= 10:
		no1 /= 10
		pow1 += 1
	while no2 >= 10:
		no2 /= 10
		pow2 += 1
	if pow1 > pow2:
		print('>')
	elif pow2 > pow1:
		print('<')
	elif pow1 == pow2:
		if no1 > no2:
			print('>')
		elif no2 > no1:
			print('<')
		else:
			print('=')


for i in range(int(input())):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	mini = min(p1, p2)
	p1 = p1 - mini
	p2 = p2 - mini
	if p1 >= 7:
		print('>')
	elif p2 >= 7:
		print('<')
	else:
		x1 = x1 * 10 ** p1
		x2 = x2 * 10 ** p2
		if x1 > x2:
			print('>')
		elif x1 == x2:
			print('=')
		else:
			print('<')


def main():
	for _ in range(int(input())):
		(a, p1) = map(int, input().split())
		(b, p2) = map(int, input().split())
		(p1, p2) = (p1 - min(p1, p2), p2 - min(p1, p2))
		(a, b) = (str(a), str(b))
		if p1 + len(a) > p2 + len(b):
			print('>')
		elif p1 + len(a) < p2 + len(b):
			print('<')
		else:
			(sa, sb) = (a + '0' * p1, b + '0' * p2)
			if sa > sb:
				print('>')
			elif sa < sb:
				print('<')
			else:
				print('=')
main()


for _ in range(int(input())):
	(x1, p1) = input().split()
	p1 = int(p1)
	(x2, p2) = input().split()
	p2 = int(p2)
	if p1 == p2:
		(x1, x2) = map(int, (x1, x2))
		print('=' if x1 == x2 else '>' if x1 > x2 else '<')
	elif len(x1) + p1 == len(x2) + p2:
		l_max = max(len(x1), len(x2))
		for (v1, v2) in zip(x1.ljust(l_max, '0'), x2.ljust(l_max, '0')):
			if v1 > v2:
				print('>')
				break
			elif v1 < v2:
				print('<')
				break
		else:
			print('=')
	elif len(x1) + p1 > len(x2) + p2:
		print('>')
	elif len(x1) + p1 < len(x2) + p2:
		print('<')


import sys
input = sys.stdin.readline
ip = lambda : input().rstrip('\n')
IP = lambda : list(map(int, ip().split()))
IPF = lambda : list(map(float, ip().split()))
import math
for i in range(int(ip())):
	(x1, p1) = IP()
	(x2, p2) = IP()
	if abs(math.log(x1 / x2, 10) - p2 + p1) <= 1e-10:
		print('=')
	elif math.log(x1 / x2, 10) < p2 - p1:
		print('<')
	else:
		print('>')


def solve(n1, p1, n2, p2):
	if len(str(n1)) + p1 > len(str(n2)) + p2:
		return '>'
	elif len(str(n1)) + p1 < len(str(n2)) + p2:
		return '<'
	if p1 > p2:
		p1 -= p2
		p2 = 0
	else:
		p2 -= p1
		p1 = 0
	num1 = int(str(n1) + '0' * p1)
	num2 = int(str(n2) + '0' * p2)
	if num1 > num2:
		return '>'
	elif num2 > num1:
		return '<'
	return '='
ans = []
for _ in range(int(input())):
	(n1, p1) = map(int, input().split())
	(n2, p2) = map(int, input().split())
	ans.append(solve(n1, p1, n2, p2))
print(*ans, sep='\n')


import math

def solution(a1, b1, a2, b2):
	val = math.log10(a1 / a2)
	if val > b2 - b1:
		return '>'
	elif val < b2 - b1:
		return '<'
	else:
		return '='
t = int(input())
for _ in range(t):
	nums1 = input().split()
	a1 = int(nums1[0])
	b1 = int(nums1[1])
	nums2 = input().split()
	a2 = int(nums2[0])
	b2 = int(nums2[1])
	print(solution(a1, b1, a2, b2))


t = int(input())
for _ in range(t):
	(num, p) = map(int, input().split())
	(num_1, p_1) = map(int, input().split())
	c = min(p, p_1)
	p -= c
	p_1 -= c
	if p >= 7:
		print('>')
	elif p_1 >= 7:
		print('<')
	else:
		for i in range(p):
			num *= 10
		for j in range(p_1):
			num_1 *= 10
		if num > num_1:
			print('>')
		elif num == num_1:
			print('=')
		else:
			print('<')


from math import *
t = int(input())
for _ in range(t):
	(x1, y1) = map(int, input().split())
	(x2, y2) = map(int, input().split())
	a = log10(x1 / x2)
	if a > y2 - y1:
		print('>')
	elif a < y2 - y1:
		print('<')
	else:
		print('=')


import sys
import pprint
import logging
from logging import getLogger

def input():
	return sys.stdin.readline().rstrip('\r\n')
logging.basicConfig(format='%(message)s', level=logging.WARNING)
logger = getLogger(__name__)
logger.setLevel(logging.INFO)

def debug(msg, *args):
	logger.info(f'{msg}={pprint.pformat(args)}')
for i in range(int(input())):
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	(p1, p2) = (int(p1), int(p2))
	(idx1, idx2) = (len(x1) - 1, len(x2) - 1)
	while idx1 >= 0 and x1[idx1] == '0':
		idx1 -= 1
		p1 += 1
	while idx2 >= 0 and x2[idx2] == '0':
		idx2 -= 1
		p2 += 1
	x1 = x1[:idx1 + 1]
	x2 = x2[:idx2 + 1]
	if len(x1) + p1 > len(x2) + p2:
		print('>')
	elif len(x1) + p1 < len(x2) + p2:
		print('<')
	elif x1 == x2 and p1 == p2:
		print('=')
	elif p1 == p2:
		if int(x1) > int(x2):
			print('>')
		else:
			print('<')
	else:
		x1 += '0' * p1
		x2 += '0' * p2
		if x1 > x2:
			print('>')
		else:
			print('<')


n = int(input())
for _ in range(n):
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	ml = lambda x, p: len(x) + int(p)
	ml1 = ml(x1, p1)
	ml2 = ml(x2, p2)
	if ml1 < ml2:
		print('<')
		continue
	elif ml1 > ml2:
		print('>')
		continue
	d = len(x1) - len(x2)
	if d > 0:
		x2 += '0' * d
	else:
		x1 += '0' * -d
	if x1 < x2:
		print('<')
	elif x1 > x2:
		print('>')
	else:
		print('=')


import math
t = int(input())
for i in range(t):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	E = math.log10(x2 / x1)
	if p1 - p2 > E:
		print('>')
	if p1 - p2 < E:
		print('<')
	if p1 - p2 == E:
		print('=')


import os, sys
from io import BytesIO, IOBase
from types import GeneratorType
from bisect import *
from collections import defaultdict, deque, Counter
import math, string
from heapq import *
from operator import add, le
from itertools import accumulate
BUFSIZE = 8192
sys.setrecursionlimit(10 ** 5)

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		import os
		self.os = os
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			self.os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
inf = float('inf')
en = lambda x: list(enumerate(x))
ceil_ = lambda a, b: (a + b - 1) // b
ii = lambda : int(input())
r = lambda : map(int, input().split())
rr = lambda : list(r())

def solve():
	(a, x) = r()
	(b, y) = r()
	c = len(str(a)) + x
	d = len(str(b)) + y
	if c < d:
		print('<')
		return
	if c > d:
		print('>')
		return
	a = list(str(a))
	b = list(str(b))
	while a[-1] == '0':
		a.pop()
		x += 1
	while b[-1] == '0':
		b.pop()
		y += 1
	if a == b and x == y:
		print('=')
		return
	a = ''.join(a)
	b = ''.join(b)
	if len(a) < len(b):
		while len(a) < len(b):
			a += '0'
	else:
		while len(b) < len(a):
			b += '0'
	a = int(a)
	b = int(b)
	if a < b:
		print('<')
	else:
		print('>')
for _ in ' ' * ii():
	solve()


def solve_test():
	(x1, p1) = map(int, input().split(' '))
	(x2, p2) = map(int, input().split(' '))
	while x1 % 10 == 0:
		x1 //= 10
		p1 += 1
	while x2 % 10 == 0:
		x2 //= 10
		p2 += 1
	digits1 = len(str(x1))
	digits2 = len(str(x2))
	if digits1 + p1 < digits2 + p2:
		return '<'
	elif digits1 + p1 > digits2 + p2:
		return '>'
	else:
		if digits1 < digits2:
			x1 = x1 * 10 ** (digits2 - digits1)
		else:
			x2 = x2 * 10 ** (digits1 - digits2)
		if x1 > x2:
			return '>'
		elif x1 < x2:
			return '<'
		return '='

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


import math
t = int(input())
for i in range(t):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	if math.log10(x1 / x2) + (p1 - p2) > 0:
		print('>')
	elif math.log10(x1 / x2) + (p1 - p2) < 0:
		print('<')
	else:
		print('=')


def solve(x1, x2, p1, p2):
	a = len(x1) + int(p1)
	b = len(x2) + int(p2)
	if a > b:
		print('>')
	elif a < b:
		print('<')
	else:
		c = len(x1) - len(x2)
		if c < 0:
			d = x1 + -1 * c * '0'
			if d < x2:
				print('<')
			elif d > x2:
				print('>')
			else:
				print('=')
		else:
			d = x2 + c * '0'
			if d < x1:
				print('>')
			elif d > x1:
				print('<')
			else:
				print('=')

def main():
	t = int(input())
	for cases in range(t):
		eins = input().split()
		zwei = input().split()
		(x1, p1) = eins
		(x2, p2) = zwei
		solve(x1, x2, p1, p2)
main()


for _ in range(int(input())):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	m = min(p1, p2)
	p1 -= m
	p2 -= m
	for i in range(p1):
		x1 *= 10
		if x2 < x1:
			break
	for j in range(p2):
		x2 *= 10
		if x2 > x1:
			break
	if x1 > x2:
		print('>')
	elif x1 == x2:
		print('=')
	else:
		print('<')


t = int(input())
for i in range(t):
	(x1, p1) = [int(f) for f in input().split(' ')]
	(x2, p2) = [int(f) for f in input().split(' ')]
	c1 = 0
	c2 = 0
	temp1 = 0
	temp2 = 0
	for i in range(6, 0, -1):
		if x1 // 10 ** i >= 1 and temp1 == 0:
			c1 = i
			temp1 = 1
		if x2 // 10 ** i >= 1 and temp2 == 0:
			c2 = i
			temp2 = 1
	if x1 > x2:
		if c1 + p1 > p2 + c2:
			print('>')
		elif c1 + p1 == c2 + p2:
			if x2 * 10 ** abs(p1 - p2) > x1:
				print('<')
			elif x2 * 10 ** abs(p1 - p2) < x1:
				print('>')
			else:
				print('=')
		else:
			print('<')
	elif x1 < x2:
		if c1 + p1 < p2 + c2:
			print('<')
		elif c1 + p1 == c2 + p2:
			if x1 * 10 ** abs(p1 - p2) > x2:
				print('>')
			elif x1 * 10 ** abs(p1 - p2) < x2:
				print('<')
			else:
				print('=')
		else:
			print('>')
	elif p1 > p2:
		print('>')
	elif p1 < p2:
		print('<')
	else:
		print('=')


import sys
input = sys.stdin.readline

def solve():
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	x1 = str(x1)
	x2 = str(x2)
	(n, m) = (len(x1) + p1, len(x2) + p2)
	if n == m:
		idx = 0
		while idx < n:
			if idx < len(x1) and idx < len(x2):
				(a, b) = (x1[idx], x2[idx])
			elif idx < len(x1):
				(a, b) = (x1[idx], '0')
			elif idx < len(x2):
				(a, b) = ('0', x2[idx])
			else:
				return '='
			if a > b:
				return '>'
			elif a < b:
				return '<'
			else:
				idx += 1
		return '='
	elif n > m:
		return '>'
	else:
		return '<'
for _ in range(int(input())):
	print(solve())


for (x, y) in zip((i := iter(((len(x) + int(p), x.strip('0')) for (x, p) in [s.split() for s in open(0)][1:]))), i):
	print('=<>'[(x < y) + 2 * (x > y)])


def num(x):
	return x[0] * 10 ** x[1]

def dig(x):
	return len(str(x[0])) + x[1]
T = int(input())
for testcase in range(1, T + 1):
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	both = min(a[1], b[1])
	a[1] -= both
	b[1] -= both
	if dig(a) > dig(b):
		print('>')
	elif dig(a) < dig(b):
		print('<')
	elif num(a) > num(b):
		print('>')
	elif num(a) == num(b):
		print('=')
	else:
		print('<')


def convert_number(x):
	for i in range(len(x)):
		if x[-1] == '0':
			x = x[:-1]
		else:
			break
	return (x, len(x))
for _ in range(int(input())):
	(x1, p1) = list(map(int, input().split(' ')))
	(x2, p2) = list(map(int, input().split(' ')))
	res1 = len(str(x1)) + p1
	res2 = len(str(x2)) + p2
	if res1 > res2:
		print('>')
	elif res1 < res2:
		print('<')
	else:
		(x1, x1_len) = convert_number(str(x1))
		(x2, x2_len) = convert_number(str(x2))
		if x1_len > x2_len:
			x2 = x2 + '0' * (x1_len - x2_len)
		elif x1_len < x2_len:
			x1 = x1 + '0' * (x2_len - x1_len)
		x1 = int(x1)
		x2 = int(x2)
		if x1 == x2:
			print('=')
		elif x1 > x2:
			print('>')
		else:
			print('<')


for i in range(int(input())):
	(x, y) = input().split()
	(x2, y2) = input().split()
	a = int(y) + len(x)
	b = int(y2) + len(x2)
	pdict = {True: '>', False: '<'}
	if a == b:
		reqlen = max(len(x), len(x2))
		x += (reqlen - len(x)) * '0'
		x2 += (reqlen - len(x2)) * '0'
		if x == x2:
			print('=')
		else:
			print(pdict[int(x) > int(x2)])
	else:
		print(pdict[a > b])


def check(s):
	if s == '':
		return True
	for i in s:
		if i != '0':
			return False
	return True
t = int(input())
for i in range(t):
	(xx, yy) = [int(x) for x in input().split(' ')]
	(pp, qq) = [int(x) for x in input().split(' ')]
	sx = len(str(xx)) + yy
	sy = len(str(pp)) + qq
	if sx > sy:
		print('>')
	elif sx < sy:
		print('<')
	else:
		p = len(str(xx))
		q = len(str(pp))
		d = min(p, q)
		t1 = int(str(xx)[0:d])
		t2 = int(str(pp)[0:d])
		if t1 == t2:
			if len(str(xx)) != d:
				if check(str(xx)[d:]):
					print('=')
					continue
				else:
					print('>')
					continue
			if len(str(pp)) != d:
				if check(str(pp)[d:]):
					print('=')
					continue
				else:
					print('<')
					continue
			if len(str(xx)) == len(str(pp)) == d:
				print('=')
				continue
		if t1 > t2:
			print('>')
		else:
			print('<')


def give(x1):
	f = False
	t = ''
	for i in x1[::-1]:
		if f:
			t += i
		elif i != '0':
			f = True
			t += i
	return t[::-1]

def solve(x1, p1, x2, p2):
	if len(x1) + int(p1) > len(x2) + int(p2):
		return '>'
	elif len(x1) + int(p1) < len(x2) + int(p2):
		return '<'
	t1 = give(x1)
	t2 = give(x2)
	if t1 > t2:
		return '>'
	if t1 == t2:
		return '='
	return '<'
for _ in range(int(input())):
	(x1, p1) = map(str, input().split())
	(x2, p2) = map(str, input().split())
	print(solve(x1, p1, x2, p2))


t = int(input())
ans = []
for i in range(t):
	(x1, p1) = map(int, input().split(' '))
	(x2, p2) = map(int, input().split(' '))
	nb1 = []
	nb2 = []
	for char in str(x1):
		nb1 += [char]
	for char in str(x2):
		nb2 += [char]
	x1 /= 10 ** (len(nb1) - 1)
	p1 += len(nb1) - 1
	x2 /= 10 ** (len(nb2) - 1)
	p2 += len(nb2) - 1
	if x1 != x2:
		if x1 == 0:
			ans.append('<')
		elif p2 == p1:
			if x1 < x2:
				ans.append('<')
			else:
				ans.append('>')
		elif p2 > p1:
			ans.append('<')
		else:
			ans.append('>')
	elif x1 == 0:
		ans.append('=')
	elif p1 == p2:
		ans.append('=')
	elif p1 > p2:
		ans.append('>')
	else:
		ans.append('<')
for i in range(len(ans)):
	print(ans[i])


from sys import stdin
import math
from collections import deque
from heapq import heapify, heappop, heappush
from bisect import bisect_left, bisect_right
input = stdin.readline

def func(x1, x2):
	if x1 > x2:
		return '>'
	elif x1 == x2:
		return '='
	else:
		return '<'
for _ in range(int(input())):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	diff1 = p2 - p1
	(x1s, x2s) = (str(x1), str(x2))
	diff2 = len(x1s) - len(x2s)
	if diff1 != 0 and diff1 != diff2:
		print(func(diff2, diff1))
	elif diff1 == 0:
		print(func(x1, x2))
	else:
		val = math.pow(10, abs(diff1))
		if diff1 < 0:
			print(func(x1 * val, x2))
		else:
			print(func(x1, x2 * val))


for _ in range(int(input())):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	gu = len(str(x1)) + p1
	a2c = len(str(x2)) + p2
	if gu > a2c:
		print('>')
	elif gu < a2c:
		print('<')
	else:
		a = min(p1, p2)
		p1 = p1 - a
		p2 = p2 - a
		gullu = p1 * '0'
		gul = str(x1) + gullu
		a20 = p2 * '0'
		gull = str(x2) + a20
		if int(gul) > int(gull):
			print('>')
		elif int(gul) == int(gull):
			print('=')
		else:
			print('<')


t = int(input())
for i in range(t):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	a = len(str(x1)) + p1
	b = len(str(x2)) + p2
	if a > b:
		print('>')
	elif a < b:
		print('<')
	elif len(str(x1)) == len(str(x2)):
		if x1 == x2:
			print('=')
		elif x1 > x2:
			print('>')
		else:
			print('<')
	elif x1 > x2:
		x2 *= 10 ** (len(str(x1)) - len(str(x2)))
		if x1 == x2:
			print('=')
		elif x1 > x2:
			print('>')
		else:
			print('<')
	else:
		x1 *= 10 ** (len(str(x2)) - len(str(x1)))
		if x1 == x2:
			print('=')
		elif x1 > x2:
			print('>')
		else:
			print('<')


from math import log

def f(n, m):
	if n > m:
		print('>')
	elif n == m:
		print('=')
	else:
		print('<')
for _ in range(int(input())):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	k = min(p1, p2)
	p1 = p1 - k
	p2 = p2 - k
	f(x1 * 10 ** min(p1, 10), x2 * 10 ** min(p2, 10))


t = int(input())
while t > 0:
	t = t - 1
	(x, p) = map(int, input().split())
	(y, q) = map(int, input().split())
	if len(str(x)) + p > len(str(y)) + q:
		print('>')
	elif len(str(x)) + p < len(str(y)) + q:
		print('<')
	else:
		if p > q:
			x = x * 10 ** (p - q)
		if q > p:
			y = y * 10 ** (q - p)
		if x > y:
			print('>')
		elif y > x:
			print('<')
		else:
			print('=')


import sys
input = lambda : sys.stdin.readline().rstrip('\r\n')
inp = lambda : list(map(int, sys.stdin.readline().rstrip('\r\n').split()))
for _ in range(int(input())):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	(a, b) = (x1, x2)
	(xx1, xx2) = (x1, x2)
	while a > 0:
		a //= 10
		xx1 /= 10
		p1 += 1
	while b > 0:
		b //= 10
		xx2 /= 10
		p2 += 1
	if p1 == p2:
		if xx1 > xx2:
			print('>')
		elif xx1 < xx2:
			print('<')
		else:
			print('=')
	elif p1 > p2:
		print('>')
	else:
		print('<')


for _ in range(int(input())):
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	if len(x1) == len(x2) and p1 == p2:
		if int(x1) == int(x2):
			print('=')
		elif int(x1) > int(x2):
			print('>')
		else:
			print('<')
	else:
		m = max(len(x1), len(x2))
		a1 = x1 + '0' * abs(len(x1) - m)
		b1 = x2 + '0' * abs(len(x2) - m)
		k1 = int(p1) + len(x1)
		k2 = int(p2) + len(x2)
		if k1 > k2:
			print('>')
		elif k1 < k2:
			print('<')
		elif a1 > b1:
			print('>')
		elif a1 < b1:
			print('<')
		else:
			print('=')


from sys import stdin, stdout

def solve():
	(x1, p1) = map(int, stdin.readline().strip().split())
	(x2, p2) = map(int, stdin.readline().strip().split())
	p = min(p1, p2)
	p1 = p1 - p
	p2 = p2 - p
	if p1 > 6:
		return '>'
	elif p2 > 6:
		return '<'
	else:
		y1 = x1 * pow(10, p1)
		y2 = x2 * pow(10, p2)
		if y1 < y2:
			return '<'
		elif y1 > y2:
			return '>'
		else:
			return '='
n = int(input())
for i in range(n):
	print(solve())


from sys import stdin
input = lambda : stdin.readline().strip()
for i in range(int(input())):
	(a, a0) = list(map(int, input().split()))
	(b, b0) = list(map(int, input().split()))
	m = min(a0, b0)
	a0 -= m
	b0 -= m
	if a0 >= 9:
		print('>')
	elif b0 >= 9:
		print('<')
	else:
		for i in range(a0):
			a *= 10
		for j in range(b0):
			b *= 10
		if a == b:
			print('=')
		elif a > b:
			print('>')
		else:
			print('<')


tests = int(input())
for _ in range(tests):
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	(p1, p2) = (int(p1), int(p2))
	if len(x1) + p1 < len(x2) + p2:
		print('<')
	elif len(x1) + p1 > len(x2) + p2:
		print('>')
	else:
		temp = min(len(x1) + p1, 7)
		x1 += '0' * (temp - len(x1))
		x2 += '0' * (temp - len(x2))
		if x1 < x2:
			print('<')
		elif x1 > x2:
			print('>')
		else:
			print('=')


import sys
input = sys.stdin.readline
for __ in range(int(input())):
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	(p1, p2) = (int(p1), int(p2))
	if len(x1) + p1 > len(x2) + p2:
		print('>')
	elif len(x1) + p1 < len(x2) + p2:
		print('<')
	else:
		if len(x1) > len(x2):
			x2 += '0' * (len(x1) - len(x2))
		else:
			x1 += '0' * (len(x2) - len(x1))
		if int(x1) > int(x2):
			print('>')
		elif int(x1) < int(x2):
			print('<')
		else:
			print('=')


t = int(input())
for i in range(t):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	mn = min(p1, p2)
	p1 -= mn
	p2 -= mn
	if p1 >= 7:
		print('>')
	elif p2 >= 7:
		print('<')
	else:
		y = x1 * 10 ** p1
		z = x2 * 10 ** p2
		if y > z:
			print('>')
		elif z > y:
			print('<')
		else:
			print('=')


t = int(input())
for i in range(t):
	s = list(input().split())
	x1 = s[0]
	p1 = int(s[1])
	s = list(input().split())
	x2 = s[0]
	p2 = int(s[1])
	n = len(x1)
	m = len(x2)
	if n + p1 > m + p2:
		print('>')
	elif n + p1 < m + p2:
		print('<')
	else:
		leng = max(n, m)
		x1 = int(x1) * 10 ** (leng - n)
		x2 = int(x2) * 10 ** (leng - m)
		if x1 > x2:
			print('>')
		elif x1 < x2:
			print('<')
		else:
			print('=')


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	while b > 0 and a < c:
		a = a * 10
		b -= 1
	while d > 0 and c < a:
		c = c * 10
		d -= 1
	if a == c:
		if b == d:
			print('=')
		elif b > d:
			print('>')
		else:
			print('<')
	elif a > c:
		if b >= d:
			print('>')
		else:
			print('<')
	elif c > a:
		if d >= b:
			print('<')
		else:
			print('>')


i = 0
a = int(input())
while i < a:
	(b, c) = input().split()
	(d, e) = input().split()
	f = int(b)
	g = int(c)
	h = int(d)
	j = int(e)
	if f > h and g > j or (f > h and g == j) or (f == h and g > j):
		print('>')
	elif f < h and g < j or (f < h and g == j) or (f == h and g < j):
		print('<')
	elif f > h and g < j:
		if len(b) + g < len(d) + j:
			print('<')
		elif len(b) + g > len(d) + j:
			print('>')
		elif len(b) + g == len(d) + j:
			k = j - g
			if f > h * 10 ** k:
				print('>')
			elif f < h * 10 ** k:
				print('<')
			else:
				print('=')
	elif f < h and g > j:
		if len(b) + g < len(d) + j:
			print('<')
		elif len(b) + g > len(d) + j:
			print('>')
		elif len(b) + g == len(d) + j:
			l = g - j
			if h > f * 10 ** l:
				print('<')
			elif h < f * 10 ** l:
				print('>')
			else:
				print('=')
	elif f == h and g == j:
		print('=')
	i = i + 1


from collections import Counter
from math import ceil, floor, log
import bisect as bs
import sys
input = sys.stdin.readline
inp_lis = lambda : list(map(int, input().split()))
inp_multi = lambda : map(int, input().split())
inp_int = lambda : int(input().strip())

def digits(n):
	c = 0
	while n > 0:
		c += 1
		n /= 10
	return c
for _ in range(int(input().strip())):
	(a, b) = inp_multi()
	(c, d) = inp_multi()
	while a >= 10:
		b += 1
		a /= 10
	while c >= 10:
		d += 1
		c /= 10
	if a > c:
		if b >= d:
			print('>')
		else:
			print('<')
	elif a == c:
		if b > d:
			print('>')
		elif b == d:
			print('=')
		else:
			print('<')
	elif b > d:
		print('>')
	elif b == d:
		print('<')
	else:
		print('<')


n = int(input())
for _ in range(n):
	(n1, zeros1) = [int(i) for i in input().split()]
	(n2, zeros2) = [int(i) for i in input().split()]
	while n1 < n2 and zeros1 > 0:
		n1 *= 10
		zeros1 -= 1
	while n1 > n2 and zeros2 > 0:
		n2 *= 10
		zeros2 -= 1
	if n1 > n2:
		if zeros1 >= zeros2:
			print('>')
		else:
			print('<')
	elif n2 > n1:
		if zeros2 >= zeros1:
			print('<')
		else:
			print('>')
	elif zeros1 == zeros2:
		print('=')
	elif zeros1 > zeros2:
		print('>')
	else:
		print('<')


for _ in range(int(input())):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	if x1 < x2:
		while x1 < x2 and p1 > 0:
			x1 *= 10
			p1 -= 1
	elif x1 > x2:
		while x1 > x2 and p2 > 0:
			x2 *= 10
			p2 -= 1
	if p1 == p2:
		if x1 > x2:
			print('>')
		elif x1 < x2:
			print('<')
		else:
			print('=')
	elif p1 > p2:
		print('>')
	else:
		print('<')


def lm():
	return map(int, input().split())

def xd():
	return int(input())

def ll():
	return list(map(int, input().split()))

def xx(x):
	sys.stdout.write(x)
a1 = xd()
for i in range(a1):
	(a, b) = lm()
	(c, d) = lm()
	e = str(min(a, c))
	a = str(a)
	c = str(c)
	s = len(a) + b
	s1 = len(c) + d
	if s > s1:
		print('>')
	elif s1 == s:
		change = False
		for i1 in range(len(e)):
			if int(a[i1]) > int(c[i1]):
				change = True
				print('>')
				break
			elif int(a[i1]) < int(c[i1]):
				change = True
				print('<')
				break
		if change == False:
			a = a.strip('0')
			c = c.strip('0')
			if len(a) > len(c):
				print('>')
			elif len(a) < len(c):
				print('<')
			else:
				print('=')
	else:
		print('<')


import math
import sys
import itertools
import fractions
wtf = sys.stdin.read()
wtf = wtf.strip().split('\n')
GAP = 2
for t in [wtf[i:i + GAP] for i in range(1, len(wtf), GAP)]:
	(x1, p1) = map(int, t[0].split())
	(x2, p2) = map(int, t[1].split())
	dp = min(p1, p2)
	p1 -= dp
	p2 -= dp
	if p1 >= 7:
		print('>')
	elif p2 >= 7:
		print('<')
	else:
		x1 *= 10 ** p1
		x2 *= 10 ** p2
		if x1 < x2:
			print('<')
		elif x1 > x2:
			print('>')
		else:
			print('=')


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
t = inp()
for _ in range(t):
	(x1, p1) = invr()
	(x2, p2) = invr()
	(p1, p2) = (p1 - min(p1, p2), p2 - min(p1, p2))
	if len(str(x1)) + p1 > len(str(x2)) + p2:
		print('>')
	elif len(str(x1)) + p1 < len(str(x2)) + p2:
		print('<')
	elif x1 * 10 ** p1 > x2 * 10 ** p2:
		print('>')
	elif x1 * 10 ** p1 < x2 * 10 ** p2:
		print('<')
	else:
		print('=')


t = int(input())
while t != 0:
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	p1 = int(p1)
	p2 = int(p2)
	if len(x1) + p1 > len(x2) + p2:
		print('>')
	elif len(x1) + p1 < len(x2) + p2:
		print('<')
	elif p1 == p2:
		if int(x1) < int(x2):
			print('<')
		if int(x1) > int(x2):
			print('>')
		if int(x1) == int(x2):
			print('=')
	else:
		maxi = max(len(x1), len(x2))
		for i in range(maxi - len(x1)):
			x1 += '0'
		for i in range(maxi - len(x2)):
			x2 += '0'
		if int(x1) > int(x2):
			print('>')
		elif int(x1) < int(x2):
			print('<')
		else:
			print('=')
	t -= 1


t = int(input())
for q in range(t):
	(x1, p1) = [int(x) for x in input().split()]
	(x2, p2) = [int(x) for x in input().split()]
	if len(str(x1)) + p1 > len(str(x2)) + p2:
		print('>')
	elif len(str(x1)) + p1 == len(str(x2)) + p2:
		k = abs(len(str(x2)) - len(str(x1)))
		if x1 <= x2:
			x1 = x1 * 10 ** k
		else:
			x2 = x2 * 10 ** k
		if x1 > x2:
			print('>')
		elif x1 < x2:
			print('<')
		else:
			print('=')
	else:
		print('<')


from collections import deque
import heapq
from math import sqrt
import operator
from operator import itemgetter
import sys
import time
import copy
inf_var = 0
if inf_var == 1:
	inf = open('input.txt', 'r')
else:
	inf = sys.stdin
input = inf.readline

def read_one_int():
	return int(input().rstrip('\n'))

def read_one_float():
	return float(input().rstrip('\n'))

def read_list_of_ints():
	res = [int(val) for val in input().rstrip('\n').split()]
	return res

def read_list_of_ints_zero():
	return [int(val) - 1 for val in input().rstrip('\n').split()]

def read_str():
	return input().rstrip()

def main():
	tests = read_one_int()
	for _ in range(tests):
		(x1, p1) = read_list_of_ints()
		(x2, p2) = read_list_of_ints()
		str1 = str(x1)
		str2 = str(x2)
		len_str1 = len(str1) + p1
		len_str2 = len(str2) + p2
		if len_str1 > len_str2:
			print('>')
			continue
		elif len_str1 < len_str2:
			print('<')
			continue
		if len(str1) < len(str2):
			str1 += '0' * (len(str2) - len(str1))
		elif len(str1) > len(str2):
			str2 += '0' * (len(str1) - len(str2))
		res = ''
		for i in range(len(str1)):
			if str1[i] > str2[i]:
				res = '>'
				break
			elif str1[i] < str2[i]:
				res = '<'
				break
		if not res:
			print('=')
		else:
			print(res)
main()


t = int(input())
for j in range(t):
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	if len(x1) + int(p1) > len(x2) + int(p2):
		print('>')
	elif len(x1) + int(p1) < len(x2) + int(p2):
		print('<')
	else:
		if len(x1) > len(x2):
			n1 = x1
			n2 = x2 + '0' * min(int(p2), abs(len(x1) - len(x2)))
		elif len(x1) < len(x2):
			n2 = x2
			n1 = x1 + '0' * min(int(p1), abs(len(x1) - len(x2)))
		else:
			n1 = x1
			n2 = x2
		n1 = int(n1)
		n2 = int(n2)
		if n1 > n2:
			print('>')
		elif n1 < n2:
			print('<')
		else:
			print('=')


for _ in range(int(input())):
	(x1, p1) = input().split()
	a = len(x1) + int(p1)
	(x2, p2) = input().split()
	b = len(x2) + int(p2)
	if a == b:
		x1 = x1.strip('0')
		x2 = x2.strip('0')
		if x1 > x2:
			print('>')
		elif x1 < x2:
			print('<')
		else:
			print('=')
	elif a > b:
		print('>')
	elif a < b:
		print('<')
	else:
		print('=')


for _ in range(int(input())):
	(x, p) = input().split()
	(x1, p1) = input().split()
	if len(x) + int(p) == len(x1) + int(p1):
		(x, p) = (int(x), int(p))
		(x1, p1) = (int(x1), int(p1))
		if x < x1:
			x *= 10 ** abs(p1 - p)
		else:
			x1 *= 10 ** abs(p1 - p)
		if x1 < x:
			print('>')
		elif x1 > x:
			print('<')
		else:
			print('=')
	elif len(x) + int(p) > len(x1) + int(p1):
		print('>')
	else:
		print('<')


from collections import defaultdict, deque
import sys
input = lambda : sys.stdin.readline().strip()
import math as m
for i in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	x = m.log10(a / c)
	if x < d - b:
		print('<')
	elif x > d - b:
		print('>')
	else:
		print('=')


t = int(input())
done = False
for i in range(0, t):
	done = False
	(x1, p1) = map(str, input().split())
	(x2, p2) = map(str, input().split())
	if len(x1) + int(p1) > len(x2) + int(p2):
		print('>')
	elif len(x1) + int(p1) < len(x2) + int(p2):
		print('<')
	elif len(x1) >= len(x2):
		for i in range(0, len(x1) - len(x2)):
			x2 += '0'
		for j in range(0, max(len(x1), len(x2))):
			if int(x1[j]) > int(x2[j]):
				print('>')
				done = True
				break
			if int(x1[j]) < int(x2[j]):
				print('<')
				done = True
				break
		if done == False:
			print('=')
	else:
		for i in range(0, len(x2) - len(x1)):
			x1 += '0'
		for j in range(0, max(len(x1), len(x2))):
			if int(x1[j]) > int(x2[j]):
				print('>')
				done = True
				break
			if int(x1[j]) < int(x2[j]):
				print('<')
				done = True
				break
		if done == False:
			print('=')


x = int(input())
for t in range(x):
	first = list(map(int, input().split()))
	second = list(map(int, input().split()))
	m = min(first[1], second[1])
	first[1] -= m
	second[1] -= m
	if first[1] >= 7:
		print('>')
	elif second[1] >= 7:
		print('<')
	else:
		for i in range(first[1]):
			first[0] *= 10
		for i in range(second[1]):
			second[0] *= 10
		if first[0] > second[0]:
			print('>')
		elif first[0] < second[0]:
			print('<')
		else:
			print('=')


import os, sys
from io import BytesIO, IOBase
from collections import defaultdict, Counter
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import ceil
mod = 10 ** 9 + 7
ans = []
for _ in range(int(input())):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	n1 = str(x1)
	idx1 = len(n1)
	for i in range(len(n1) - 1, -1, -1):
		if n1[i] == '0':
			idx1 = i
			continue
		else:
			break
	n2 = str(x2)
	idx2 = len(n2)
	for i in range(len(n2) - 1, -1, -1):
		if n2[i] == '0':
			idx2 = i
			continue
		else:
			break
	a = len(str(x1)[:idx1]) + p1 + len(n1) - idx1
	b = len(str(x2)[:idx2]) + p2 + len(n2) - idx2
	if a < b:
		ans.append('<')
	elif a > b:
		ans.append('>')
	else:
		num1 = str(x1)[:idx1]
		num2 = str(x2)[:idx2]
		smaller = 0
		for i in range(min(len(num1), len(num2))):
			if num1[i] < num2[i]:
				smaller = 1
				break
			elif num1[i] > num2[i]:
				smaller = 2
				break
		if smaller == 0:
			if len(num2) < len(num1):
				smaller = 2
			elif len(num1) < len(num2):
				smaller = 1
		if smaller == 0:
			ans.append('=')
		elif smaller == 1:
			ans.append('<')
		else:
			ans.append('>')
for i in ans:
	print(i)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(a, at) = map(int, input().split())
	(b, bt) = map(int, input().split())
	d = min(at, bt)
	at -= d
	bt -= d
	if at > 7:
		print('>')
	elif bt > 7:
		print('<')
	else:
		for i in range(at):
			a *= 10
		for i in range(bt):
			b *= 10
		if a > b:
			print('>')
		elif b > a:
			print('<')
		else:
			print('=')


def main():
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	(p1, p2) = (int(p1), int(p2))
	if len(x1) + p1 > len(x2) + p2:
		return '>'
	elif len(x1) + p1 < len(x2) + p2:
		return '<'
	if p1 != p2:
		if p1 > p2:
			x1 += '0' * (p1 - p2)
		elif p2 > p1:
			x2 += '0' * (p2 - p1)
	(x1, x2) = (int(x1), int(x2))
	if x1 > x2:
		return '>'
	elif x2 > x1:
		return '<'
	return '='
tests = int(input())
while tests:
	tests -= 1
	print(main())


t = int(input())
lst = []
for x in range(t):
	(a, az) = input().split()
	(b, bz) = input().split()
	if len(a) + int(az) > len(b) + int(bz):
		lst.append('>')
	elif len(a) + int(az) < len(b) + int(bz):
		lst.append('<')
	else:
		lm = len(a)
		ln = len(b)
		while len(b) > len(a):
			a += '0'
		while len(a) > len(b):
			b += '0'
		if a > b:
			lst.append('>')
		elif a < b:
			lst.append('<')
		else:
			lst.append('=')
print('\n'.join(lst))


t = int(input())
for u in range(0, t):
	l1 = input()
	l2 = input()
	l1 = l1.split()
	l2 = l2.split()
	x1 = l1[0]
	p1 = int(l1[1])
	x2 = l2[0]
	p2 = int(l2[1])
	if p1 + len(x1) > p2 + len(x2):
		print('>')
		continue
	elif p1 + len(x1) < p2 + len(x2):
		print('<')
		continue
	flag = 0
	d = 0
	if p1 > p2:
		flag = 1
		d = p1 - p2
	elif p1 < p2:
		flag = 2
		d = p2 - p1
	else:
		if x1 > x2:
			print('>')
		elif x1 < x2:
			print('<')
		else:
			print('=')
		continue
	if flag == 1:
		target = x1
	elif flag == 2:
		target = x2
	if d % 2 == 0 and d > 0:
		while d > 0:
			target = target + '00'
			d = d - 2
	elif d % 2 != 0 and d > 0:
		for u in range(0, d):
			target = target + '0'
	if flag == 1:
		x1 = target
	elif flag == 2:
		x2 = target
	x1 = int(x1)
	x2 = int(x2)
	if x1 > x2:
		print('>')
	elif x1 < x2:
		print('<')
	else:
		print('=')


def countOfNum(c):
	cnt = 0
	while c != 0:
		c //= 10
		cnt += 1
	return cnt
t = int(input())
for q in range(t):
	(x, p) = map(int, input().split())
	(y, o) = map(int, input().split())
	m = countOfNum(x) + p
	n = countOfNum(y) + o
	if m > n:
		print('>')
	elif m < n:
		print('<')
	else:
		m -= p
		n -= o
		P = max(m, n)
		x *= 10 ** (P - m)
		y *= 10 ** (P - n)
		if x > y:
			print('>')
		elif x < y:
			print('<')
		else:
			print('=')


import sys
import bisect
import math
from collections import deque
input = lambda : sys.stdin.readline().strip()
mod = 10 ** 9 + 7

def solve():
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	(p1, p2) = (int(p1), int(p2))
	if len(x1) + p1 > len(x2) + p2:
		return '>'
	elif len(x1) + p1 < len(x2) + p2:
		return '<'
	else:
		m = min(len(x1), len(x2))
		if x1[:m] < x2[:m]:
			return '<'
		elif x1[:m] > x2[:m]:
			return '>'
		elif len(x1) == len(x2) or x1[m:].count('0') + x2[m:].count('0') == len(x1) + len(x2) - 2 * m:
			return '='
		elif len(x1) == m:
			return '<'
		else:
			return '>'
t = 1
t = int(input())
for _ in range(t):
	print(solve())


t = int(input())
for _ in range(t):
	(a, b) = input().split()
	(c, d) = input().split()
	b = int(b)
	d = int(d)
	v1 = len(a) + b
	v2 = len(c) + d
	if v1 < v2:
		print('<')
	elif v1 > v2:
		print('>')
	else:
		temp = min(v1, 7)
		a += '0' * (temp - len(a))
		c += '0' * (temp - len(c))
		if a < c:
			print('<')
		elif a > c:
			print('>')
		else:
			print('=')


for i in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	a1 = len(str(a))
	c1 = len(str(c))
	a2 = str(a)
	c2 = str(c)
	l1 = a1 + b
	l2 = c1 + d
	if a1 > c1:
		c2 += (a1 - c1) * '0'
	else:
		a2 += (c1 - a1) * '0'
	if l1 > l2:
		print('>')
	elif l1 < l2:
		print('<')
	else:
		k = 0
		for i in range(max(a1, c1)):
			if a2[i] > c2[i]:
				k = 1
				break
			elif a2[i] < c2[i]:
				k = 2
				break
		if k == 1:
			print('>')
		elif k == 2:
			print('<')
		else:
			print('=')


for _ in range(int(input())):
	(x1, p1) = list(map(int, input().split()))
	(x2, p2) = list(map(int, input().split()))
	l1 = len(str(x1))
	l2 = len(str(x2))
	if l1 + p1 != l2 + p2:
		if l1 + p1 > l2 + p2:
			print('>')
			continue
		elif l1 + p1 < l2 + p2:
			print('<')
			continue
	Min = max(l1, l2)
	s1 = str(x1)
	s2 = str(x2)
	while len(s1) < Min:
		s1 += '0'
	while len(s2) < Min:
		s2 += '0'
	if s1 > s2:
		print('>')
	elif s1 < s2:
		print('<')
	else:
		print('=')


t = int(input())
ans = []
for _ in range(t):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	s1 = len(str(x1))
	p1 += s1
	x1 /= 10 ** s1
	s2 = len(str(x2))
	p2 += s2
	x2 /= 10 ** s2
	if p1 < p2:
		ans.append('<')
	elif p1 > p2:
		ans.append('>')
	elif x1 < x2:
		ans.append('<')
	elif x1 > x2:
		ans.append('>')
	else:
		ans.append('=')
for i in ans:
	print(i)


n = int(input())
for i in range(n):
	(x1, p1) = map(str, input().split())
	(x2, p2) = map(str, input().split())
	if len(x1) + int(p1) > len(x2) + int(p2):
		print('>')
	elif len(x1) + int(p1) < len(x2) + int(p2):
		print('<')
	else:
		a = len(x1) - len(x2)
		if a > 0:
			if int(x1) > int(x2 + '0' * a):
				print('>')
			elif int(x1) < int(x2 + '0' * a):
				print('<')
			else:
				print('=')
		elif a < 0:
			if int(x1 + '0' * abs(a)) > int(x2):
				print('>')
			elif int(x1 + '0' * abs(a)) < int(x2):
				print('<')
			else:
				print('=')
		elif int(x1) > int(x2):
			print('>')
		elif int(x1) < int(x2):
			print('<')
		else:
			print('=')


for _ in range(int(input())):
	(a, b) = ([0, 0], [0, 0])
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	a3 = max(len(str(a1)), len(str(a2)))
	a = [b1 + len(str(a1)), int(str(a1) + '0' * (a3 - len(str(a1))))]
	b = [b2 + len(str(a2)), int(str(a2) + '0' * (a3 - len(str(a2))))]
	if a[0] > b[0]:
		print('>')
	elif a[0] < b[0]:
		print('<')
	elif a[1] > b[1]:
		print('>')
	elif a[1] < b[1]:
		print('<')
	else:
		print('=')


n = int(input())
for i in range(n):
	(num1, zeros1) = map(int, input().split())
	(num2, zeros2) = map(int, input().split())
	mn = min(zeros1, zeros2)
	z1 = zeros1 - mn
	z2 = zeros2 - mn
	if z1 > 7:
		print('>')
	elif z2 > 7:
		print('<')
	else:
		n1 = num1 * 10 ** z1
		n2 = num2 * 10 ** z2
		if n1 > n2:
			print('>')
		elif n1 < n2:
			print('<')
		else:
			print('=')


import sys, os, io
import math, cmath, time, collections
input = sys.stdin.readline
start_time = time.time()
primes = []
mod = 10 ** 9 + 7

def power(x, b):
	p = 1
	while b > 0:
		if b & 1:
			p = p * x
			p = p % mod
		b = b >> 1
		x = x ** x
		x = x % mod
	return p % mod

def seive(n):
	a = []
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p ** 2, n + 1, p):
				prime[i] = False
		p = p + 1
	for p in range(2, n + 1):
		if prime[p]:
			primes.append(p)

def yn(x):
	if x:
		sys.stdout.write('Yes' + '\n')
	else:
		sys.stdout.write('No' + '\n')

def canfit(v, cows, mid):
	tcow = 0
	for i in range(1, len(v)):
		if v[i] - v[i - 1] >= mid:
			tcow += 1
			if tcow == cows:
				return True
	return False

def solve():
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	mp = min(p1, p2)
	(p1, p2) = (p1 - mp, p2 - mp)
	if p1 >= 7:
		sys.stdout.write('>' + '\n')
		return
	elif p2 >= 7:
		sys.stdout.write('<' + '\n')
		return
	else:
		x1 = x1 * 10 ** p1
		x2 = x2 * 10 ** p2
		if x1 > x2:
			sys.stdout.write('>' + '\n')
		else:
			sys.stdout.write('<' + '\n' if x1 < x2 else '=' + '\n')
		return

def main():
	tc = 1
	tc = int(input())
	for testcases in range(1, tc + 1):
		solve()
	sys.stdout.close()
main()


t = int(input())
for number in range(t):
	(x1, p1) = input().split()
	p1 = int(p1)
	(x2, p2) = input().split()
	p2 = int(p2)
	if len(x1) + p1 != len(x2) + p2:
		print('<' if len(x1) + p1 < len(x2) + p2 else '>')
	else:
		x1 = int(x1) * pow(10, max(0, p1 - p2))
		x2 = int(x2) * pow(10, max(0, p2 - p1))
		if x1 == x2:
			print('=')
		else:
			print('<' if x1 < x2 else '>')


def verifica(x1, p1, x2, p2):
	p1 = int(p1)
	p2 = int(p2)
	if len(x1) + p1 < len(x2) + p2:
		return 0
	if len(x1) + p1 > len(x2) + p2:
		return 2
	while len(x1) < len(x2) and p1 > 0:
		x1 += '0'
		p1 -= 1
	while len(x1) > len(x2) and p2 > 0:
		x2 += '0'
		p2 -= 1
	if x1 < x2:
		return 0
	elif x1 == x2:
		return 1
	return 2
t = int(input())
for test in range(1, t + 1):
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	ans = verifica(x1, p1, x2, p2)
	if ans == 0:
		print('<')
	elif ans == 1:
		print('=')
	else:
		print('>')


t = int(input())
for _ in range(t):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	d1 = len(str(x1)) + p1
	d2 = len(str(x2)) + p2
	if d1 > d2:
		print('>')
		continue
	if d1 < d2:
		print('<')
		continue
	d = abs(p1 - p2)
	n1 = x1
	n2 = x2
	if p1 > p2:
		n1 = int(str(x1) + '0' * d)
	else:
		n2 = int(str(x2) + '0' * d)
	if n1 == n2:
		print('=')
		continue
	if n1 > n2:
		print('>')
		continue
	if n1 < n2:
		print('<')


import sys
import io, os
input = sys.stdin.buffer.readline
t = int(input())
for _ in range(t):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	if len(str(x1)) + p1 > len(str(x2)) + p2:
		print('>')
	elif len(str(x1)) + p1 < len(str(x2)) + p2:
		print('<')
	else:
		x1 = str(x1)
		x2 = str(x2)
		flag = -1
		if len(x1) >= len(x2):
			for (c1, c2) in zip(x1, x2):
				if int(c1) > int(c2):
					flag = 1
					break
				elif int(c1) < int(c2):
					flag = 0
					break
			else:
				for i in range(len(x2), len(x1)):
					if x1[i] != '0':
						flag = 1
						break
				else:
					flag = -1
			if flag == -1:
				print('=')
			elif flag == 1:
				print('>')
			else:
				print('<')
		else:
			for (c1, c2) in zip(x1, x2):
				if int(c1) > int(c2):
					flag = 1
					break
				elif int(c1) < int(c2):
					flag = 0
					break
			else:
				for i in range(len(x1), len(x2)):
					if x2[i] != '0':
						flag = 0
						break
				else:
					flag = -1
			if flag == -1:
				print('=')
			elif flag == 1:
				print('>')
			else:
				print('<')


from collections import defaultdict as dd
import math
import sys
input = sys.stdin.readline

def nn():
	return int(input())

def li():
	return list(input())

def mi():
	return map(int, input().split())

def lm():
	return list(map(int, input().split()))

def solve():
	(n1, p1) = mi()
	(n2, p2) = mi()
	s1 = str(n1)
	s2 = str(n2)
	if p1 + len(s1) > p2 + len(s2):
		print('>')
	elif p1 + len(s1) == p2 + len(s2):
		if p1 > p2:
			n1 = n1 * 10 ** (p1 - p2)
		elif p2 > p1:
			n2 = n2 * 10 ** (p2 - p1)
		if n1 > n2:
			print('>')
		elif n1 == n2:
			print('=')
		else:
			print('<')
	else:
		print('<')
q = nn()
for _ in range(q):
	solve()


t = int(input())
for i in range(t):
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	if len(x1) + int(p1) != len(x2) + int(p2):
		if len(x1) + int(p1) > len(x2) + int(p2):
			print('>')
		else:
			print('<')
	elif int(x1.strip('0')) == int(x2.strip('0')):
		print('=')
	elif sorted([x1.strip('0'), x2.strip('0')])[0] == x2.strip('0'):
		print('>')
	else:
		print('<')


t = int(input())
while t > 0:
	t -= 1
	(x1, p1) = map(int, input().split())
	n_x1 = str(x1)
	x1_s = len(n_x1)
	(x2, p2) = map(int, input().split())
	n_x2 = str(x2)
	x2_s = len(n_x2)
	if x1_s + p1 > x2_s + p2:
		print('>')
	elif x1_s + p1 < x2_s + p2:
		print('<')
	else:
		maxx = max(x1_s, x2_s)
		if p1 - maxx + x1_s >= 0:
			n_x1 = n_x1 + '0' * (maxx - x1_s)
		if p2 - maxx + x2_s >= 0:
			n_x2 = n_x2 + '0' * (maxx - x2_s)
		ans_x1 = int(n_x1)
		ans_x2 = int(n_x2)
		if ans_x1 > ans_x2:
			print('>')
		elif ans_x1 < ans_x2:
			print('<')
		else:
			print('=')


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	(p1, p2) = (int(p1), int(p2))
	(l1, l2) = (len(x1), len(x2))
	(ma, ans) = (max(l1, l2), '=')
	if l1 + p1 > l2 + p2:
		ans = '>'
	elif l1 + p1 < l2 + p2:
		ans = '<'
	else:
		(x1, x2) = (int(x1 + '0' * (ma - l1)), int(x2 + '0' * (ma - l2)))
		if x1 > x2:
			ans = '>'
		elif x1 < x2:
			ans = '<'
	print(ans)


import os
import math
import sys
from io import BytesIO, IOBase
from math import gcd

def main():
	for _ in range(int(input())):
		(a, b) = map(int, input().split())
		(x, y) = map(int, input().split())
		a = math.log(a / x, 10)
		if a > y - b:
			print('>')
		elif a < y - b:
			print('<')
		else:
			print('=')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


in_data = []
num = input()
for i in range(int(num)):
	in_data.append([])
	in_data[i].append(input())
	in_data[i].append(input())
for i in range(int(num)):
	first = [int(e) for e in in_data[i][0].split(' ')]
	second = [int(e) for e in in_data[i][1].split(' ')]
	power1 = len(str(first[0])) - 1
	full_power1 = power1 + first[1]
	result_1 = first[0] / 10 ** power1
	power2 = len(str(second[0])) - 1
	full_power2 = power2 + second[1]
	result_2 = second[0] / 10 ** power2
	if full_power1 > full_power2:
		print('>')
	elif full_power1 < full_power2:
		print('<')
	elif result_1 > result_2:
		print('>')
	elif result_1 < result_2:
		print('<')
	else:
		print('=')


import sys
import math
from math import log2 as lg
from collections import deque
import random
import heapq
import itertools
const = 1000000007
n = int(input())
for i in range(n):
	first = input().split(' ')
	second = input().split(' ')
	(f, s) = (len(first[0]) + int(first[1]), len(second[0]) + int(second[1]))
	if f < s:
		print('<')
	elif f > s:
		print('>')
	else:
		found = False
		for i in range(min(len(first[0]), len(second[0]))):
			if int(first[0][i]) < int(second[0][i]):
				print('<')
				found = True
				break
			elif int(first[0][i]) > int(second[0][i]):
				print('>')
				found = True
				break
		if not found:
			if len(first[0]) > len(second[0]):
				if int(first[0][len(second[0]):]) != 0:
					print('>')
					found = True
			elif len(second[0]) > len(first[0]):
				if int(second[0][len(first[0]):]) != 0:
					print('<')
					found = True
		if not found:
			print('=')


t = int(input())
for i in range(t):
	(x1, p1) = map(str, input().split())
	(x2, p2) = map(str, input().split())
	l1 = len(x1) + int(p1)
	l2 = len(x2) + int(p2)
	x1 = x1.strip('0')
	x2 = x2.strip('0')
	if l1 > l2:
		print('>')
	elif l1 < l2:
		print('<')
	else:
		ans = None
		for i in range(min(len(x1), len(x2))):
			if x1[i] > x2[i]:
				ans = '>'
				break
			elif x1[i] < x2[i]:
				ans = '<'
				break
		if ans is None:
			if len(x1) == len(x2):
				print('=')
			elif len(x1) > len(x2):
				print('>')
			else:
				print('<')
		else:
			print(ans)


t = int(input())
for _ in range(t):
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	temp1 = len(x1)
	temp2 = len(x2)
	x1 = int(x1.rstrip('0'))
	x2 = int(x2.rstrip('0'))
	l1 = len(str(x1))
	l2 = len(str(x2))
	p1 = int(p1) + temp1 - l1
	p2 = int(p2) + temp2 - l2
	if x1 > x2:
		if l1 + p1 > l2 + p2:
			print('>')
		elif l1 + p1 == l2 + p2:
			if x1 > x2 * 10 ** (l1 - l2):
				print('>')
			else:
				print('<')
		else:
			print('<')
	elif x1 < x2:
		if l1 + p1 < l2 + p2:
			print('<')
		elif l1 + p1 == l2 + p2:
			if x1 * 10 ** (l2 - l1) < x2:
				print('<')
			else:
				print('>')
		else:
			print('>')
	elif p1 > p2:
		print('>')
	elif p1 < p2:
		print('<')
	else:
		print('=')


import sys
input = sys.stdin.readline

def diff(a, b, c, d):
	if len(a) + int(b) > len(c) + int(d):
		return 1
	if len(a) + int(b) < len(c) + int(d):
		return -1
	(a, b, c, d) = (int(a), int(b), int(c), int(d))
	if abs(b - d) > 10:
		return b - d
	if b > d:
		return a * 10 ** (b - d) - c
	return -(c * 10 ** (d - b) - a)

def solve():
	(a, b) = input().split(' ')
	(c, d) = input().split(' ')
	delta = diff(a, b, c, d)
	sys.stdout.write('>' if delta > 0 else '<' if delta < 0 else '=')
	sys.stdout.write('\n')
cases = int(input())
for _ in range(cases):
	solve()


for _ in range(int(input())):
	(x, a) = map(int, input().split(' '))
	(y, b) = map(int, input().split(' '))
	if len(str(x)) + a > len(str(y)) + b:
		print('>')
		continue
	if len(str(x)) + a < len(str(y)) + b:
		print('<')
		continue
	swapped = False
	if x > y:
		((x, a), (y, b)) = ((y, b), (x, a))
		swapped = True
	if x == y:
		print('=')
		continue
	num = int(str(x) + '0' * (a - b))
	if num == y:
		print('=')
	elif num > y:
		print('<' if swapped else '>')
	else:
		print('>' if swapped else '<')


test = int(input())
for t in range(test):
	(b1, e1) = list(map(int, input().strip().split()))
	(b2, e2) = list(map(int, input().strip().split()))
	if e1 >= e2:
		remaining = e1 - e2
		while b1 <= b2 and remaining > 0:
			b1 *= 10
			remaining -= 1
		if b1 < b2:
			print('<')
		elif b1 > b2:
			print('>')
		else:
			print('=')
	else:
		remaining = e2 - e1
		while b1 >= b2 and remaining > 0:
			b2 *= 10
			remaining -= 1
		if b1 < b2:
			print('<')
		elif b1 > b2:
			print('>')
		else:
			print('=')


from __future__ import division, print_function
import math
import sys
import os
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def inp():
	return int(input())

def inps():
	return input().strip()

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input().strip()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())
for _ in range(inp()):
	(x1, p1) = invr()
	(x2, p2) = invr()
	s1 = str(x1)
	s2 = str(x2)
	if len(s1) + p1 > len(s2) + p2:
		print('>')
	elif len(s1) + p1 < len(s2) + p2:
		print('<')
	else:
		while len(s1) != len(s2):
			if len(s1) < len(s2):
				s1 += '0'
			else:
				s2 += '0'
		v1 = int(s1)
		v2 = int(s2)
		if v1 > v2:
			print('>')
		elif v1 < v2:
			print('<')
		else:
			print('=')


for i in range(int(input())):
	(a, b) = input().split()
	(x, y) = input().split()
	if int(b) + len(a) > int(y) + len(x):
		print('>')
	elif int(b) + len(a) < int(y) + len(x):
		print('<')
	else:
		sp = abs(len(a) - len(x))
		if sp != 0:
			if len(a) > len(x) and sp <= int(y):
				x += '0' * sp
			elif len(a) < len(x) and sp <= int(b):
				a += '0' * sp
		if int(a) > int(x):
			print('>')
		elif int(a) < int(x):
			print('<')
		else:
			print('=')


import collections
import sys
from collections import OrderedDict, Counter, defaultdict
import math
import bisect
from sys import stdin, stdout

def with_index():
	a = []
	i = 0
	for t in map(int, input().split()):
		a.append((t, i))
		i += 1
	return a

def get_line():
	return list(map(int, sys.stdin.readline().strip().split()))

def in1():
	return int(input())

def take_input():
	return stdin.readline()

def display_arr(arr):
	stdout.write(' '.join(map(str, arr)) + '\n')

def display_num(num):
	stdout.write(str(num) + '\n')

def factorial(n):
	return n * factorial(n - 1) if n > 1 else 1

def percent(c, s):
	return c / s * 100

def l2d(a):
	d = {}
	for i in a:
		if i in d:
			d[i] += 1
		else:
			d[i] = 1
	return d
for _ in range(in1()):
	(x1, p1) = get_line()
	(x2, p2) = get_line()
	if p2 > p1 + 10:
		print('<')
		continue
	if p1 > p2 + 10:
		print('>')
		continue
	if p1 > p2:
		x1 *= pow(10, p1 - p2)
	else:
		x2 *= pow(10, p2 - p1)
	if x1 > x2:
		print('>')
	elif x2 > x1:
		print('<')
	else:
		print('=')


t = int(input())
for _ in range(t):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	c = min(p1, p2)
	p1 -= c
	p2 -= c
	if p1 >= 7:
		print('>')
	elif p2 >= 7:
		print('<')
	elif x1 * 10 ** p1 < x2 * 10 ** p2:
		print('<')
	elif x1 * 10 ** p1 > x2 * 10 ** p2:
		print('>')
	else:
		print('=')


def func(x1, p1, x2, p2):
	k = min(p1, p2)
	p1 = p1 - k
	p2 = p2 - k
	p1 = min(10, p1)
	p2 = min(10, p2)
	x1 = x1 * 10 ** p1
	x2 = x2 * 10 ** p2
	if x1 > x2:
		return '>'
	elif x1 < x2:
		return '<'
	return '='
T = int(input())
for i in range(T):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	print(func(x1, p1, x2, p2))


for _ in range(int(input())):
	(x, p) = map(int, input().split())
	(y, q) = map(int, input().split())
	k = min(p, q)
	p -= k
	q -= k
	p = min(10, p)
	q = min(10, q)
	x *= 10 ** p
	y *= 10 ** q
	print('=' if x == y else '><'[x < y])


import sys

def compare(x1, x2):
	if len(x1) > len(x2):
		return 1
	elif len(x1) < len(x2):
		return -1
	for (i1, i2) in zip(x1, x2):
		if ord(i1) > ord(i2):
			return 1
		elif ord(i1) < ord(i2):
			return -1
	return 0
for _ in range(int(sys.stdin.readline())):
	(x1, a1) = sys.stdin.readline().split()
	(x2, a2) = sys.stdin.readline().split()
	a1 = int(a1)
	a2 = int(a2)
	m = min(a1, a2)
	a1 = a1 - m
	a2 = a2 - m
	if a1 >= 7:
		print('>')
		continue
	elif a2 >= 7:
		print('<')
		continue
	x1 = list(x1) + ['0'] * a1
	x2 = list(x2) + ['0'] * a2
	res = compare(x1, x2)
	if res > 0:
		print('>')
	elif res < 0:
		print('<')
	else:
		print('=')


import sys
input = sys.stdin.readline

def iinput():
	return int(input())

def sinput():
	return input().rstrip()

def i0input():
	return int(input()) - 1

def linput():
	return list(input().split())

def liinput():
	return list(map(int, input().split()))

def miinput():
	return map(int, input().split())

def li0input():
	return list(map(lambda x: int(x) - 1, input().split()))

def mi0input():
	return map(lambda x: int(x) - 1, input().split())
INF = 10 ** 20
MOD = 1000000007
t = iinput()
for _ in [0] * t:
	(x1, p1) = liinput()
	(x2, p2) = liinput()
	l1 = len(str(x1)) + p1
	l2 = len(str(x2)) + p2
	if l1 > l2:
		print('>')
	elif l1 < l2:
		print('<')
	else:
		l1 = max(0, len(str(x2)) - len(str(x1)))
		l2 = max(0, len(str(x1)) - len(str(x2)))
		x1 *= 10 ** l1
		x2 *= 10 ** l2
		if x1 > x2:
			print('>')
		elif x1 < x2:
			print('<')
		else:
			print('=')


import sys
import math
from fractions import Fraction
from decimal import *
input = sys.stdin.readline
t = int(input())
while t > 0:
	inp = input().strip()
	arr = [int(x) for x in inp.split(' ')]
	x1 = arr[0]
	p1 = arr[1]
	inp = input().strip()
	arr = [int(x) for x in inp.split(' ')]
	x2 = arr[0]
	p2 = arr[1]
	x = x1
	d1 = p1
	while x > 0:
		d1 += 1
		x = x // 10
	x = x2
	d2 = p2
	while x > 0:
		d2 += 1
		x = x // 10
	if d1 > d2:
		print('>')
	elif d1 < d2:
		print('<')
	else:
		s1 = str(x1)
		s2 = str(x2)
		i = 0
		printed = False
		while i < len(s1) and i < len(s2):
			if s1[i] > s2[i]:
				print('>')
				printed = True
				break
			elif s1[i] < s2[i]:
				print('<')
				printed = True
				break
			i += 1
		if not printed:
			if i < len(s1):
				while i < len(s1):
					if s1[i] != '0':
						print('>')
						printed = True
						break
					i += 1
				if not printed:
					print('=')
			elif i < len(s2):
				while i < len(s2):
					if s2[i] != '0':
						print('<')
						printed = True
						break
					i += 1
				if not printed:
					print('=')
			else:
				print('=')
	t -= 1


for _ in range(int(input())):
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	(l1, l2) = (len(x1), len(x2))
	(t1, t2) = (l1 + int(p1), l2 + int(p2))
	if t1 > t2:
		print('>')
	elif t1 < t2:
		print('<')
	else:
		if l1 > l2:
			x2 += '0' * (l1 - l2)
		elif l1 < l2:
			x1 += '0' * (l2 - l1)
		if int(x1) > int(x2):
			print('>')
		elif int(x1) < int(x2):
			print('<')
		else:
			print('=')


t = int(input())
for _ in range(t):
	(x1, p1) = list(map(int, input().split()))
	(x2, p2) = list(map(int, input().split()))
	x = len(str(x1))
	y = len(str(x2))
	x += p1
	y += p2
	if x > y:
		print('>')
	elif y > x:
		print('<')
	else:
		x = str(x1)
		y = str(x2)
		t = 0
		for i in range(min(len(x), len(y))):
			if int(x[i]) > int(y[i]):
				print('>')
				t = 1
				break
			elif int(x[i]) < int(y[i]):
				print('<')
				t = 1
				break
			else:
				continue
		if t == 0:
			i += 1
			temp = 0
			if len(x) > len(y):
				while i < len(x):
					if x[i] == '0':
						i += 1
					else:
						print('>')
						temp = 1
						break
				if temp == 0:
					print('=')
			elif len(x) < len(y):
				while i < len(y):
					if y[i] == '0':
						i += 1
					else:
						print('<')
						temp = 1
						break
				if temp == 0:
					print('=')
			else:
				print('=')


a = int(input())
i = 0
while i < a:
	b = list(map(int, input().split(' ')))
	c = list(map(int, input().split(' ')))
	b[0] = str(b[0])
	c[0] = str(c[0])
	p = min(b[1], c[1])
	b[1] = b[1] - p
	c[1] = c[1] - p
	if len(c[0]) + c[1] > len(b[0]) + b[1]:
		print('<')
	if len(c[0]) + c[1] < len(b[0]) + b[1]:
		print('>')
	if len(c[0]) + c[1] == len(b[0]) + b[1]:
		if int(b[0]) * 10 ** b[1] > int(c[0]) * 10 ** c[1]:
			print('>')
		if int(b[0]) * 10 ** b[1] < int(c[0]) * 10 ** c[1]:
			print('<')
		if int(b[0]) * 10 ** b[1] == int(c[0]) * 10 ** c[1]:
			print('=')
	i = i + 1


n = int(input())
for i in range(0, n):
	(a, b) = input().split()
	(c, d) = input().split()
	(b, d) = map(int, (b, d))
	if len(a) + b > len(c) + d:
		print('>')
	elif len(a) + b < len(c) + d:
		print('<')
	else:
		if b > d:
			x = int(a + '0' * (b - d))
			y = int(c)
		elif b < d:
			x = int(a)
			y = int(c + '0' * (d - b))
		else:
			x = int(a)
			y = int(c)
		if x > y:
			print('>')
		elif x < y:
			print('<')
		else:
			print('=')


t = int(input())

def compare(x1, x2, p1, p2):
	pass
for i in range(t):
	(x1, p1) = map(str, input().split())
	(x2, p2) = map(str, input().split())
	if len(x1) + int(p1) > len(x2) + int(p2):
		print('>')
	elif len(x1) + int(p1) < len(x2) + int(p2):
		print('<')
	else:
		d = len(x1) - len(x2)
		if d > 0:
			if int(x1[0:len(x2)]) > int(x2):
				print('>')
			elif int(x1[0:len(x2)]) < int(x2):
				print('<')
			elif int(x1[len(x2):]) != 0:
				print('>')
			else:
				print('=')
		elif d < 0:
			if int(x2[0:len(x1)]) > int(x1):
				print('<')
			elif int(x2[0:len(x1)]) < int(x1):
				print('>')
			elif int(x2[len(x1):]) != 0:
				print('<')
			else:
				print('=')
		elif int(x1) > int(x2):
			print('>')
		elif int(x1) < int(x2):
			print('<')
		else:
			print('=')


t = int(input())
for t1 in range(t):
	(x1, p1) = input().split(' ')
	(x2, p2) = input().split(' ')
	po1 = len(x1) - 1 + int(p1)
	po2 = len(x2) - 1 + int(p2)
	if po1 < po2:
		print('<')
	elif po1 > po2:
		print('>')
	else:
		if len(x1) < len(x2):
			x1 = x1 + (len(x2) - len(x1)) * '0'
		else:
			x2 = x2 + (len(x1) - len(x2)) * '0'
		if x1 > x2:
			print('>')
		elif x1 < x2:
			print('<')
		else:
			print('=')


import sys
input = sys.stdin.readline
t = int(input())
for i in range(t):
	(n1, m1) = map(int, input().split())
	(n2, m2) = map(int, input().split())
	while n1 >= 10:
		n1 = n1 / 10
		m1 += 1
	while n2 >= 10:
		n2 = n2 / 10
		m2 += 1
	if m1 > m2:
		print('>')
	elif m1 < m2:
		print('<')
	elif n1 > n2:
		print('>')
	elif n1 < n2:
		print('<')
	else:
		print('=')


from bisect import bisect_right as bl
from random import randint as R
RI = lambda : [int(_x) for _x in input().split()]
II = lambda : int(input())
import sys
for _ in range(II()):
	(a, b) = RI()
	(x, y) = RI()
	if len(str(a)) > len(str(x)):
		diff = len(str(a)) - len(str(x))
		a /= 10 ** diff
		b += diff
	elif len(str(a)) < len(str(x)):
		diff = -len(str(a)) + len(str(x))
		x /= 10 ** diff
		y += diff
	if b > y:
		print('>')
	elif b < y:
		print('<')
	elif a == x:
		print('=')
	elif a > x:
		print('>')
	else:
		print('<')


for _ in range(int(input())):
	(x1, l1) = map(int, input().split())
	(x2, l2) = map(int, input().split())
	(s1, s2) = (str(x1), str(x2))
	if len(s1) + l1 > len(s2) + l2:
		print('>')
	elif len(s1) + l1 < len(s2) + l2:
		print('<')
	else:
		if len(s1) < len(s2):
			x1 = x1 * 10 ** abs(len(s1) - len(s2))
		elif len(s1) > len(s2):
			x2 = x2 * 10 ** abs(len(s1) - len(s2))
		if x1 > x2:
			print('>')
		elif x1 < x2:
			print('<')
		else:
			print('=')


t = int(input())
for _ in range(t):
	(a, c1) = map(int, input().split())
	(b, c2) = map(int, input().split())
	m = min(c1, c2)
	c1 -= m
	c2 -= m
	if c1 >= 7:
		print('>')
	elif c2 >= 7:
		print('<')
	else:
		a *= pow(10, c1)
		b *= pow(10, c2)
		if a > b:
			print('>')
		elif a < b:
			print('<')
		else:
			print('=')


import math
from heapq import heappush, heappop, heapify
import random
import string
from collections import deque
from bisect import bisect, bisect_left, bisect_right, insort
import sys
input = sys.stdin.readline
S = lambda : input().rstrip()
I = lambda : int(S())
M = lambda : map(int, S().split())
L = lambda : list(M())
mod1 = 1000000000 + 7
mod2 = 998244353
for _ in range(I()):
	(x1, p1) = M()
	(x2, p2) = M()
	if len(str(x1)) + p1 > len(str(x2)) + p2:
		print('>')
	elif len(str(x1)) + p1 < len(str(x2)) + p2:
		print('<')
	else:
		t = abs(p1 - p2)
		if len(str(x1)) <= len(str(x2)):
			x1 = int(str(x1) + '0' * t)
		else:
			x2 = int(str(x2) + '0' * t)
		if x1 < x2:
			print('<')
		elif x1 > x2:
			print('>')
		else:
			print('=')


for _ in [0] * int(input()):
	(x1, p1) = list(input().split())
	(x2, p2) = list(input().split())
	z = len(x1) + int(p1)
	y = len(x2) + int(p2)
	if z > y:
		print('>')
		continue
	elif z < y:
		print('<')
		continue
	elif len(x1) > len(x2):
		x2 = x2 + '0' * (len(x1) - len(x2))
	elif len(x1) < len(x2):
		x1 = x1 + '0' * (len(x2) - len(x1))
	if int(x1) > int(x2):
		print('>')
	elif int(x1) < int(x2):
		print('<')
	else:
		print('=')


testcases = int(input())
str = ''
for i in range(testcases):
	(fnum, fexp) = input().split()
	(snum, sexp) = input().split()
	fnum = float(fnum)
	fexp = float(fexp)
	snum = float(snum)
	sexp = float(sexp)
	while fnum >= 10:
		fnum = fnum / 10
		fexp = fexp + 1
	while snum >= 10:
		snum = snum / 10
		sexp = sexp + 1
	if sexp == fexp:
		if snum == fnum:
			str = str + '='
		elif snum > fnum:
			str = str + '<'
		else:
			str = str + '>'
	elif sexp > fexp:
		str = str + '<'
	else:
		str = str + '>'
for i in range(testcases):
	if i == testcases - 1:
		print(str[i], end='')
	else:
		print(str[i])


for _ in range(int(input())):
	(x, p) = map(int, input().split())
	(y, q) = map(int, input().split())
	if len(str(x)) + p > len(str(y)) + q:
		print('>')
	elif len(str(x)) + p < len(str(y)) + q:
		print('<')
	else:
		if p > q:
			x = x * 10 ** (p - q)
		if q > p:
			y = y * 10 ** (q - p)
		if x > y:
			print('>')
		elif y > x:
			print('<')
		else:
			print('=')


for _ in range(int(input())):
	(x1, y1) = input().split()
	y1 = int(y1)
	(x2, y2) = input().split()
	y2 = int(y2)
	lx1 = len(x1)
	lx2 = len(x2)
	if lx1 + y1 > lx2 + y2:
		print('>')
	elif lx1 + y1 < lx2 + y2:
		print('<')
	else:
		if lx1 >= lx2:
			x2 += '0' * (lx1 - lx2)
		else:
			x1 += '0' * (lx2 - lx1)
		if x1 > x2:
			print('>')
		elif x1 == x2:
			print('=')
		else:
			print('<')


import sys
import collections
import bisect
from functools import lru_cache
for _ in range(int(input())):
	(x1, p1) = sys.stdin.readline().split()
	(x2, p2) = sys.stdin.readline().split()
	p1 = int(p1)
	p2 = int(p2)
	p1 += len(x1)
	p2 += len(x2)
	if p1 > p2:
		print('>')
	elif p2 > p1:
		print('<')
	else:
		if len(x1) > len(x2):
			x2 += '0' * (len(x1) - len(x2))
		elif len(x2) > len(x1):
			x1 += '0' * (len(x2) - len(x1))
		if int(x1) == int(x2):
			print('=')
		elif x1 > x2:
			print('>')
		else:
			print('<')


import sys
import math
import copy
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def inltstr():
	return list(map(str, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def factorial(n):
	if n == 1:
		return n
	elif n < 1:
		return 'NA'
	else:
		return n * factorial(n - 1)

def coeffBin(k):
	return factorial(k + 1) / (factorial(2) * factorial(k - 1))

def solve(f, s):
	res = None
	s1 = str(f[0])
	s2 = str(s[0])
	if len(s1) + f[1] < len(s2) + s[1]:
		return '<'
	elif len(s1) + f[1] > len(s2) + s[1]:
		return '>'
	else:
		mi = s1 if f[0] < s[0] else s2
		ma = s1 if f[0] > s[0] else s2
		check = 0
		for i in range(0, len(mi)):
			if s1[i] != s2[i]:
				check = 1 if int(s1[i]) < int(s2[i]) else 2
				break
		if check == 0 and len(s1) != len(s2) and (int(ma[len(mi):len(ma)]) != 0):
			return '>' if f[0] > s[0] else '<'
		if check == 0:
			return '='
		elif check == 1:
			return '<'
		elif check == 2:
			return '>'
	return res
res = []
iter = inp()
i = 0
while i < iter:
	f = inlt()
	s = inlt()
	result = solve(f, s)
	res.append(result)
	i += 1
for r in res:
	print(r)


for i in range(int(input())):
	(a, b) = input().split()
	(c, d) = input().split()
	if len(a) + int(b) > len(c) + int(d):
		print('>')
	elif len(a) + int(b) < len(c) + int(d):
		print('<')
	else:
		a = int(a)
		b = int(b)
		c = int(c)
		d = int(d)
		if int(a) > int(c):
			c *= 10 ** (d - b)
		else:
			a *= 10 ** (b - d)
		if a > c:
			print('>')
		elif a == c:
			print('=')
		else:
			print('<')


for _ in range(int(input())):
	(a, v1) = map(int, input().split())
	(b, v2) = map(int, input().split())
	le = len(str(a)) + v1
	le1 = len(str(b)) + v2
	if a < b:
		if v1 <= v2:
			print('<')
		elif le == le1:
			mi = min(v1, v2)
			v1 -= mi
			v2 -= mi
			a *= 10 ** v1
			b *= 10 ** v2
			if a == b:
				print('=')
			else:
				print('<' if a < b else '>')
		else:
			print('<' if le < le1 else '>')
	elif a == b:
		if v1 == v2:
			print('=')
		else:
			print('>' if v1 > v2 else '<')
	elif v1 >= v2:
		print('>')
	elif le == le1:
		mi = min(v1, v2)
		v1 -= mi
		v2 -= mi
		a *= 10 ** v1
		b *= 10 ** v2
		if a == b:
			print('=')
		else:
			print('<' if a < b else '>')
	else:
		print('<' if le < le1 else '>')


for i in range(int(input())):
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	g = [a[1], b[1]]
	g = [g[0] - min(g), g[1] - min(g)]
	if g[0] > 7:
		print('>')
	elif g[1] > 7:
		print('<')
	else:
		a[0] = int(str(a[0]) + g[0] * '0')
		b[0] = int(str(b[0]) + g[1] * '0')
		if a[0] > b[0]:
			print('>')
		elif a[0] < b[0]:
			print('<')
		else:
			print('=')


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if len(str(a)) + b < len(str(c)) + d:
		print('<')
		continue
	if len(str(a)) + b > len(str(c)) + d:
		print('>')
		continue
	elif b == d:
		if a > c:
			print('>')
		if a < c:
			print('<')
		if a == c:
			print('=')
		continue
	else:
		while a < 1000000 and b > 0:
			a *= 10
			b -= 1
		while c < 1000000 and d > 0:
			c *= 10
			d -= 1
		if a > c:
			print('>')
		if a < c:
			print('<')
		if a == c:
			print('=')


tests = int(input())
for testc in range(tests):
	(x1, p1) = list(map(int, input().split()))
	(x2, p2) = list(map(int, input().split()))
	if p1 > p2 + 10:
		print('>')
		continue
	if p2 > p1 + 10:
		print('<')
		continue
	if p1 > p2:
		x1 *= 10 ** (p1 - p2)
	else:
		x2 *= 10 ** (p2 - p1)
	if x1 > x2:
		print('>')
	elif x1 < x2:
		print('<')
	else:
		print('=')


t = int(input())
while t > 0:
	t -= 1
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a == 0:
		if c != 0:
			print('<')
		else:
			print('=')
		continue
	if c == 0:
		print('>')
		continue
	if b > d + 6:
		print('>')
	elif d > b + 6:
		print('<')
	else:
		if d > b:
			i = d - b
			while i > 0:
				c *= 10
				i -= 1
		if d < b:
			i = b - d
			while i > 0:
				a *= 10
				i -= 1
		if a > c:
			print('>')
		elif a < c:
			print('<')
		else:
			print('=')


for _ in range(int(input())):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	m = min(p1, p2)
	p1 = p1 - m
	p2 = p2 - m
	if p1 > 6:
		print('>')
	elif p2 > 6:
		print('<')
	else:
		x1 = x1 * 10 ** p1
		x2 = x2 * 10 ** p2
		if x1 > x2:
			print('>')
		elif x2 > x1:
			print('<')
		else:
			print('=')


t = int(input())
a = []
for i in range(2 * t):
	a += [list(map(int, input().split()))]

def g(x, y):
	if x < y:
		return '<'
	elif x > y:
		return '>'
	else:
		return '='

def f(x, p, y, q):
	c = len(str(x))
	d = len(str(y))
	if c + p != d + q:
		return g(c + p, d + q)
	else:
		return g(x * 10 ** (9 - c), y * 10 ** (9 - d))
for i in range(t):
	print(f(a[2 * i][0], a[2 * i][1], a[2 * i + 1][0], a[2 * i + 1][1]))


t = int(input())
for i in range(t):
	(x1, p1) = tuple((x for x in input().split()))
	(x2, p2) = tuple((x for x in input().split()))
	n1 = len(x1) + int(p1)
	n2 = len(x2) + int(p2)
	if n1 > n2:
		print('>')
	elif n2 > n1:
		print('<')
	else:
		found = False
		for i in range(max(len(x1), len(x2))):
			first = 0 if len(x2) > len(x1) and i >= len(x1) else int(x1[i])
			second = 0 if len(x1) > len(x2) and i >= len(x2) else int(x2[i])
			if first > second:
				print('>')
				found = True
				break
			if first < second:
				print('<')
				found = True
				break
		if not found:
			print('=')


for i in range(int(input())):
	(a, b) = input().split()
	(x, y) = input().split()
	(b, y) = (int(b), int(y))
	if len(a) + b < len(x) + y:
		print('<')
		continue
	if len(a) + b > len(x) + y:
		print('>')
		continue
	k = min(b, y)
	b -= k
	y -= k
	v = str(a) + '0' * b
	u = str(x) + '0' * y
	if v == u:
		print('=')
	elif v < u:
		print('<')
	else:
		print('>')


n = int(input())
output = []
for cases in range(n):
	num1 = input().split()
	num2 = input().split()
	digits1 = len(num1[0]) + int(num1[1])
	digits2 = len(num2[0]) + int(num2[1])
	if digits1 > digits2:
		output.append('>')
	elif digits1 < digits2:
		output.append('<')
	else:
		flag = False
		len1 = len(num1[0])
		len2 = len(num2[0])
		for x in range(max(len1, len2)):
			if x >= len1:
				c1 = 0
			else:
				c1 = int(num1[0][x])
			if x >= len2:
				c2 = 0
			else:
				c2 = int(num2[0][x])
			if c1 > c2:
				output.append('>')
				flag = True
				break
			elif c1 < c2:
				output.append('<')
				flag = True
				break
		if flag == False:
			output.append('=')
for element in output:
	print(element)


import sys
from collections import defaultdict, deque
from bisect import bisect_left
import math
input = sys.stdin.readline

def inp():
	l = list(map(int, input().split()))
	return l
for _ in range(int(input())):
	(x1, p1) = inp()
	(x2, p2) = inp()
	x = min(p1, p2)
	p1 -= x
	p2 -= x
	a = len(str(x1))
	b = len(str(x2))
	if p1 > 0:
		x1 = max(x1 * 10 ** min(p1, b - a + 2), x1)
	if p2 > 0:
		x2 = max(x2 * 10 ** min(p2, a - b + 2), x2)
	if x1 > x2:
		print('>')
	elif x2 > x1:
		print('<')
	else:
		print('=')


import sys

def solve():
	(x1, p1) = map(int, sys.stdin.readline().split())
	(x2, p2) = map(int, sys.stdin.readline().split())
	s1 = str(x1)
	s2 = str(x2)
	while len(s1) < len(s2):
		if p1 > 0:
			p1 -= 1
			s1 += '0'
		else:
			print('<')
			return
	while len(s2) < len(s1):
		if p2 > 0:
			p2 -= 1
			s2 += '0'
		else:
			print('>')
			return
	if p1 > p2:
		print('>')
	elif p2 > p1:
		print('<')
	elif int(s1) < int(s2):
		print('<')
	elif int(s1) > int(s2):
		print('>')
	else:
		print('=')

def main():
	for i in range(int(sys.stdin.readline())):
		solve()
main()


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())
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)
			if a > c:
				print('>')
				return
			elif a < c:
				print('<')
				return
			else:
				print('=')
				return
		elif m < n:
			a *= 10 ** (n - m)
			if a > c:
				print('>')
				return
			elif a < c:
				print('<')
				return
			else:
				print('=')
				return
for _ in range(I()):
	solve()


for _ in range(int(input())):
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	n1 = len(x1)
	n2 = len(x2)
	(x1, p1) = (int(x1), int(p1))
	(x2, p2) = (int(x2), int(p2))
	if n1 < n2:
		v = n2 - n1
		power = min(p1, v)
		x1 *= 10 ** power
		p1 -= power
	elif n1 > n2:
		v = n1 - n2
		power = min(p2, v)
		x2 *= 10 ** power
		p2 -= power
	if p1 > p2:
		print('>')
	elif p1 < p2:
		print('<')
	elif x1 > x2:
		print('>')
	elif x1 < x2:
		print('<')
	else:
		print('=')


for t in range(int(input())):
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	p1 = int(p1)
	p2 = int(p2)
	if len(x1) > len(x2):
		dl = len(x1) - len(x2)
		if p2 - dl >= 0:
			p2 -= dl
			x2 += dl * '0'
		else:
			print('>')
			continue
	elif len(x1) < len(x2):
		dl = len(x2) - len(x1)
		if p1 - dl >= 0:
			p1 -= dl
			x1 += dl * '0'
		else:
			print('<')
			continue
	if p1 > p2:
		print('>')
	elif p1 < p2:
		print('<')
	elif int(x1) > int(x2):
		print('>')
	elif int(x1) < int(x2):
		print('<')
	else:
		print('=')


t = int(input())
for _ in range(t):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	while x1 % 10 == 0:
		x1 //= 10
		p1 += 1
	while x2 % 10 == 0:
		x2 //= 10
		p2 += 1
	if len(str(x1)) + p1 > len(str(x2)) + p2:
		print('>')
	elif len(str(x1)) + p1 < len(str(x2)) + p2:
		print('<')
	elif str(x1) > str(x2):
		print('>')
	elif str(x1) < str(x2):
		print('<')
	else:
		print('=')


for _ in range(int(input())):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	x1 = str(x1)
	x2 = str(x2)
	l1 = len(x1) + p1
	l2 = len(x2) + p2
	if l1 < l2:
		print('<')
	elif l1 > l2:
		print('>')
	else:
		if int(x1) < int(x2):
			l = len(x2) - len(x1)
			z = '0' * l
			x1 = x1 + z
			x1 = int(x1)
			x2 = int(x2)
		elif int(x1) > int(x2):
			l = len(x1) - len(x2)
			z = '0' * l
			x2 = x2 + z
			x1 = int(x1)
			x2 = int(x2)
		else:
			x1 = int(x1)
			x2 = int(x2)
		if x1 > x2:
			print('>')
		elif x1 < x2:
			print('<')
		else:
			print('=')


for _ in range(int(input())):
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	p1 = int(p1)
	p2 = int(p2)
	if len(x1) + p1 == len(x2) + p2:
		if len(x1) < len(x2):
			x1 += '0' * (len(x2) - len(x1))
		else:
			x2 += '0' * (len(x1) - len(x2))
		x3 = int(x1)
		x4 = int(x2)
		print('<' if x3 < x4 else '=' if x3 == x4 else '>')
	elif len(x1) + p1 > len(x2) + p2:
		print('>')
	else:
		print('<')


def fn(n1, n2):
	n1_d = len(str(n1[0])) + n1[1]
	n2_d = len(str(n2[0])) + n2[1]
	if n1_d > n2_d:
		return '>'
	if n1_d < n2_d:
		return '<'
	a = str(n1[0])
	b = str(n2[0])
	m = min(len(a), len(b))
	if int(a[:m]) > int(b[:m]):
		return '>'
	if int(a[:m]) < int(b[:m]):
		return '<'
	if len(a) == len(b):
		return '='
	if len(a) > len(b):
		if int(a[m:]) > 0:
			return '>'
		else:
			return '='
	if len(a) < len(b):
		if int(b[m:]) > 0:
			return '<'
		else:
			return '='
t = int(input())
for _ in range(t):
	n1 = list(map(int, input().split(' ')))
	n2 = list(map(int, input().split(' ')))
	res = fn(n1, n2)
	print(res)


import random
from collections import Counter, defaultdict
from copy import deepcopy as dc
import math
try:
	t = int(input())
	for tt in range(1, t + 1):
		(x, y) = map(int, input().split())
		(x1, y1) = map(int, input().split())
		while x % 10 == 0:
			y += 1
			x //= 10
		while x1 % 10 == 0:
			y1 += 1
			x1 //= 10
		flag = 0
		(a, b) = (str(x), str(x1))
		if y1 == y:
			flag = 1
			if x1 == x:
				print('=')
			elif x1 > x:
				print('<')
			else:
				print('>')
		elif len(a) + y > len(b) + y1:
			print('>')
			flag = 1
		elif len(a) + y < len(b) + y1:
			print('<')
			flag = 1
		j = 0
		for i in range(min(len(a), len(b))):
			if flag == 1:
				break
			if a[i] > b[i]:
				print('>')
				flag = 1
			elif a[i] < b[i]:
				print('<')
				flag = 1
			j += 1
		if flag == 0:
			if j < len(a):
				print('>')
			elif j < len(b):
				print('<')
			else:
				print('=')
except EOFError as e:
	pass


import io, os, sys
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
output = sys.stdout.write
INF = float('inf')

def solve(x1, p1, x2, p2):
	mn = min(p1, p2)
	p1 -= mn
	p2 -= mn
	(x1, x2) = (str(x1), str(x2))
	if len(x1) + p1 < len(x2) + p2:
		return '<'
	if len(x1) + p1 > len(x2) + p2:
		return '>'
	(N1, N2) = (len(x1), len(x2))
	N = len(x1) + p1
	for i in range(N):
		n1 = x1[i] if i < N1 else '0'
		n2 = x2[i] if i < N2 else '0'
		if n1 < n2:
			return '<'
		if n1 > n2:
			return '>'
	return '='

def main():
	T = int(input())
	for _ in range(T):
		(x1, p1) = list(map(int, input().split()))
		(x2, p2) = list(map(int, input().split()))
		out = solve(x1, p1, x2, p2)
		output(f'{out}\n')
main()


for _ in range(int(input())):
	(x1, p1) = map(int, input().split())
	(x2, p2) = map(int, input().split())
	q = min(p1, p2)
	p1 -= q
	p2 -= q
	p1 = min(p1, 10)
	p2 = min(p2, 10)
	a = x1 * 10 ** p1
	b = x2 * 10 ** p2
	if a == b:
		print('=')
	elif a > b:
		print('>')
	else:
		print('<')


t = int(input())
for _ in range(t):
	(x1, p1) = [int(i) for i in input().split()]
	(x2, p2) = [int(i) for i in input().split()]
	l1 = len(str(x1))
	l2 = len(str(x2))
	n1 = x1 / 10 ** (l1 - 1)
	n2 = x2 / 10 ** (l2 - 1)
	pow1 = p1 + l1 - 1
	pow2 = p2 + l2 - 1
	if n1 > n2:
		if pow1 >= pow2:
			print('>')
		else:
			print('<')
	elif n2 > n1:
		if pow2 >= pow1:
			print('<')
		else:
			print('>')
	elif pow1 > pow2:
		print('>')
	elif pow2 > pow1:
		print('<')
	else:
		print('=')


for _ in range(int(input())):
	(x1, p1) = [int(x) for x in input().split()]
	(x2, p2) = [int(x) for x in input().split()]
	mn = min(p1, p2)
	p1 = p1 - mn
	p2 = p2 - mn
	if len(str(x1)) + p1 > len(str(x2)) + p2:
		print('>')
	elif len(str(x1)) + p1 < len(str(x2)) + p2:
		print('<')
	else:
		a = str(x1) + '0' * p1
		b = str(x2) + '0' * p2
		if a > b:
			print('>')
		elif a < b:
			print('<')
		else:
			print('=')


from math import log10
t = int(input())
for i in range(t):
	(x1, y1) = map(int, input().split())
	(x2, y2) = map(int, input().split())
	n = log10(x1 / x2)
	if n > y2 - y1:
		print('>')
	elif n < y2 - y1:
		print('<')
	else:
		print('=')


t = int(input())
for _ in range(t):
	(x1, p1) = input().split()
	(x2, p2) = input().split()
	p1 = int(p1)
	p2 = int(p2)
	x = min(p1, p2)
	p1 -= x
	p2 -= x
	if len(x1) + p1 > len(x2) + p2:
		print('>')
	elif len(x1) + p1 < len(x2) + p2:
		print('<')
	else:
		n1 = x1 + '0' * p1
		n2 = x2 + '0' * p2
		n1 = int(n1)
		n2 = int(n2)
		if n1 > n2:
			print('>')
		elif n1 < n2:
			print('<')
		else:
			print('=')