exec("a,b=input().split();print(chr([[62,60][eval(a+chr(60)+b)],61][a==b]));"*int(input()))