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.*;
  import java.util.*;
  import java.text.*;
  import java.math.*;
  import java.util.regex.*;
  
  public class JaiShreeRam{
  	static Scanner in=new Scanner();
  	static long mod = 1000000007;
  	static ArrayList<ArrayList<Integer>> adj;
  	static int seive[]=new int[1000001];
  	public static void main(String[] args) throws Exception{
  		int z=in.readInt();
  		while(z-->0) {
  			solve();
  		}
  	}
  	static void solve() {
  		long x1=in.readLong();
  		long p1=in.readLong();
  		long x2=in.readLong();
  		long p2=in.readLong();
  		long min=Math.min(p1,p2);
  		p1-=min;
  		p2-=min;
  		if(p1==0) {
  			if(x1<x2) {
  				System.out.println("<");
  			}
  			else if(x2*Math.pow(10, Math.min(7, p2))>x1) {
  				System.out.println("<");
  			}
  			else if(x2*Math.pow(10, Math.min(7, p2))<x1) {
  				System.out.println(">");
  			}
  			else {
  				System.out.println("=");
  			}
  		}
  		else {
  			if(x1>x2) {
  				System.out.println(">");
  			}
  			else if(x1*Math.pow(10, Math.min(7, p1))>x2) {
  				System.out.println(">");
  			}
  			else if(x1*Math.pow(10, Math.min(7, p1))<x2) {
  				System.out.println("<");
  			}
  			else {
  				System.out.println("=");
  			}
  		}
  	}
  	static void seive() {
  		Arrays.fill(seive, 1);
  		seive[0]=0;
  		seive[1]=0;
  		for(int i=2;i*i<1000001;i++) {
  			if(seive[i]==1) {
  				for(int j=i*i;j<1000001;j+=i) {
  					if(seive[j]==1) {
  						seive[j]=0;
  					}
  				}
  			}
  		}
  	}
  	static int[] nia(int n){
  		int[] arr= new int[n];
  		int i=0;
  		while(i<n){
  			arr[i++]=in.readInt();
  		}
  		return arr;
  	}
  	static long[] nla(int n){
  		long[] arr= new long[n];
  		int i=0;
  		while(i<n){
  			arr[i++]=in.readLong();
  		}
  		return arr;
  	}
  	static int[] nia1(int n){
  		int[] arr= new int[n+1];
  		int i=1;
  		while(i<=n){
  			arr[i++]=in.readInt();
  		}
  		return arr;
  	}
  	static Integer[] ninta(int n){
  		Integer[] arr= new Integer[n];
  		int i=0;
  		while(i<n){
  			arr[i++]=in.readInt();
  		}
  		return arr;
  	}
  	static long gcd(long a, long b) {
  		if (b==0) return a;
  		return gcd(b, a%b);
  	}
  	static class Scanner{
  		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
  		StringTokenizer st=new StringTokenizer("");
  		String readString() {
  			while (!st.hasMoreTokens())
  				try {
  					st=new StringTokenizer(br.readLine());
  				} catch (IOException e) {
  					e.printStackTrace();
  				}
  			return st.nextToken();
  		}
  		double readDouble() {
  			return Double.parseDouble(readString());
  		}
  		int readInt() {
  			return Integer.parseInt(readString());
  		}
  		long readLong() {
  			return Long.parseLong(readString());
  		}
  	}
  }