description: 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 ≤ t ≤ 10^4) — the number of testcases.
  
  The first line of each testcase contains two integers x_1 and p_1 (1 ≤ x_1 ≤ 10^6; 0 ≤ p_1 ≤ 10^6) — the description of the first number.
  
  The second line of each testcase contains two integers x_2 and p_2 (1 ≤ x_2 ≤ 10^6; 0 ≤ p_2 ≤ 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 '='.
  
  Example
  
  Input
  
  
  5
  2 1
  19 0
  10 2
  100 1
  1999 0
  2 3
  1 0
  1 0
  99 0
  1 2
  
  
  Output
  
  
  &gt;
  =
  &lt;
  =
  &lt;
  
  Note
  
  The comparisons in the example are: 20 > 19, 1000 = 1000, 1999 < 2000, 1 = 1, 99 < 100.
solution: import java.io.BufferedReader;
  import java.io.IOException;
  import java.io.InputStreamReader;
  import java.io.PrintWriter;
  import java.util.*;
  
  public class Practice {
  	public static long mod = (long) Math.pow(10, 9) + 7;
  	public static long mod2 = 998244353;
  	public static int oo = 0;
  	public static ArrayList<Integer> prime;
  	public static int zz = -1;
  
  	public static void main(String[] args) throws Exception {
  		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
  		PrintWriter pw = new PrintWriter(System.out);
  		int t = Integer.parseInt(br.readLine());
  		int p = 1;
  
  		while (t-- > 0) {
  			String[] s1 = br.readLine().split(" ");
  			int a1 = Integer.valueOf(s1[0]);
  			int p1 = Integer.valueOf(s1[1]);
  
  			String[] s2 = br.readLine().split(" ");
  			int a2 = Integer.valueOf(s2[0]);
  			int p2 = Integer.valueOf(s2[1]);
  			int o1 = a1, o2 = a2;
  			int c1 = 0, c2 = 0;
  			while (o1 > 0) {
  				o1 = o1 / 10;
  				c1++;
  			}
  			while (o2 > 0) {
  				o2 = o2 / 10;
  				c2++;
  			}
  			if (c1 + p1 > c2 + p2) {
  				System.out.println(">");
  			} else if (c1 + p1 < c2 + p2) {
  				System.out.println("<");
  			} else {
  				if (c1 == c2) {
  					if (a1 > a2) {
  						System.out.println(">");
  					} else if (a2 > a1) {
  						System.out.println("<");
  					} else {
  						System.out.println("=");
  					}
  				} else if (c2 > c1) {
  					a1 = a1 * (int) Math.pow(10, c2 - c1);
  					if (a1 > a2) {
  						System.out.println(">");
  					} else if (a2 > a1) {
  						System.out.println("<");
  					} else {
  						System.out.println("=");
  					}
  				} else {
  					a2 = a2 * (int) Math.pow(10, -c2 + c1);
  					if (a1 > a2) {
  						System.out.println(">");
  					} else if (a2 > a1) {
  						System.out.println("<");
  					} else {
  						System.out.println("=");
  					}
  				}
  			}
  
  		}
  		pw.close();
  	}
  
  }
  
  //	private static void getFac(long n, PrintWriter pw) {
  //		// TODO Auto-generated method stub
  //		int a = 0;
  //		while (n % 2 == 0) {
  //			a++;
  //			n = n / 2;
  //		}
  //		if (n == 1) {
  //			a--;
  //		}
  //		for (int i = 3; i <= Math.sqrt(n); i += 2) {
  //			while (n % i == 0) {
  //				n = n / i;
  //				a++;
  //			}
  //		}
  //		if (n > 1) {
  //			a++;
  //		}
  //		if (a % 2 == 0) {
  //			pw.println("Bob");
  //		} else {
  //			pw.println("Alice");
  //		}
  //		//System.out.println(a);
  //		return;
  //	}
  
  //	private static long power(long a, long p) {
  //		// TODO Auto-generated method stub
  //		long res = 1;
  //		while (p > 0) {
  //			if (p % 2 == 1) {
  //				res = (res * a) % mod;
  //			}
  //			p = p / 2;
  //			a = (a * a) % mod;
  //		}
  //		return res;
  //	}
  //
  //	private static void fac() {
  //		fac[0] = 1;
  //		// TODO Auto-generated method stub
  //		for (int i = 1; i < fac.length; i++) {
  //			if (i == 1) {
  //				fac[i] = 1;
  //			} else {
  //				fac[i] = i * fac[i - 1];
  //			}
  //			if (fac[i] > mod) {
  //				fac[i] = fac[i] % mod;
  //			}
  //		}
  //	}
  //
  //	private static int getLower(Long long1, Long[] st) {
  //		// TODO Auto-generated method stub
  //		int left = 0, right = st.length - 1;
  //		int ans = -1;
  //		while (left <= right) {
  //			int mid = (left + right) / 2;
  //			if (st[mid] <= long1) {
  //				ans = mid;
  //				left = mid + 1;
  //			} else {
  //				right = mid - 1;
  //			}
  //		}
  //		return ans;
  //	}
  
  //	private static long getGCD(long l, long m) {
  //
  //		long t1 = Math.min(l, m);
  //		long t2 = Math.max(l, m);
  //		while (true) {
  //			long temp = t2 % t1;
  //			if (temp == 0) {
  //				return t1;
  //			}
  //			t2 = t1;
  //			t1 = temp;
  //		}
  //	}