n=int(input()) for i in range(n): a,b=map(int,input().split()) if a==b: print("=") continue A,B=a,b while A!=0 and B!=0: A/=10 B/=10 if A==0 and B!=0: print("<") continue elif A!=0 and B==0: print(">") continue A,B=a%10,b%10 flg=False for i in range(11): if A+i==B: print("<") flg=True break if not flg: print(">")