N = int(input()) for _ in range(N): a, b = map(int, input().split()) if a == b: print('=') else: print(chr(61 + (a - b) // abs(a - b)))