using System; using System.Collections.Generic; using System.Linq; using System.IO; //using System.Text; //using System.Text.RegularExpressions; //using System.Globalization; //using System.Diagnostics; using static System.Console; //using System.Numerics; //using static System.Math; class Program { static void Main() { SetOut(new StreamWriter(OpenStandardOutput()) { AutoFlush = false }); new Program().solve(); Out.Flush(); } //Scanner cin = new Scanner(); readonly int[] dd = { 0, 1, 0, -1, 0 }; //→↓←↑ readonly int mod = 1000000007; void solve() { var c = '?'; int N = int.Parse(ReadLine()); for (int i = 0; Math.Abs(i.CompareTo(N)) != i.CompareTo(N); i++) { var A = Array.ConvertAll(ReadLine().Split(), int.Parse); int a = A[0]; int b = A[1]; if (a.Equals(b)) { WriteLine("="); } else if (Math.Abs(a.CompareTo(b)) == a.CompareTo(b)) { WriteLine((char)(c - 1)); } else { WriteLine((char)(c - 3)); } } //WriteLine((char)(c + 1)); } }