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: /* package codechef; // don't place package name! */
  
  import java.util.*;
  import java.lang.*;
  import java.io.*;
  
  /* Name of the class has to be "Main" only if the class is public. */
  
  public class Codechef
  {
      static final PrintWriter out =new PrintWriter(System.out);
      static final FastReader sc = new FastReader();
      static long m  = 998244353;
  	public static void main (String[] args) throws java.lang.Exception
  	{
  		
  		long t = sc.nextLong();
  		while(t-- >0)
  		{
  		   int x1 = sc.nextInt();
  		   int p1 = sc.nextInt();
  		   int x2 = sc.nextInt();
  		   int p2 = sc.nextInt();
  		   
  		   String s1 = String.valueOf(x1);
  		   String s2 = String.valueOf(x2);
  		   s1.toString();
  		   s2.toString();
  		  int x = s1.length();
  		  int y = s2.length();
  		  
  		  long q =(long) x+p1;
  		  long w =(long) y+p2;
  		  
  		  if(q<w) out.println("<");
  		  else if(q>w) out.println(">");
  		  else if(q==w)
  		  {
  			 if(p1==p2)
  			 {
  				 if(x1<x2) out.println("<");
  				 else if(x1>x2) out.println(">");
  				 else out.println("=");
  			 }
  			 else if(p1<p2)
  			 {
  				 int i=0; boolean check = false , check2 =false;
  				 while(i<y)
  				 {
  					 if(s1.charAt(i) < s2.charAt(i))
  						 {
  						 out.println("<");
  						 check = false; break;
  						 }
  					 else if(s1.charAt(i) > s2.charAt(i))
  						 {
  						 out.println(">"); check = false; break;
  						 }
  					 else 
  					 {
  						 check = true;
  						 
  					 }
  					i++; 
  				 }
  				 if(check == true) 
  				 {
  					 
  					 while(i<x)
  					 {
  						 if(s1.charAt(i) > '0')
  						 {
  							 check2=false;
  							 out.println(">"); break;
  						 }
  						 else
  						 {
  							 check2=true;
  						 }
  						 i++;
  					 }
  				 }
  				 if(check2==true) out.println("=");
  			 }
  			 else if(p1>p2)
  			 {
  				 int i=0; boolean check = false , check2 =false;
  				 while(i<x)
  				 {
  					 if(s1.charAt(i) < s2.charAt(i))
  						 {
  						 out.println("<");
  						 check = false; break;
  						 }
  					 else if(s1.charAt(i) > s2.charAt(i))
  						 {
  						 out.println(">"); check = false; break;
  						 }
  					 else 
  					 {
  						 check = true;
  						 
  					 }
  					i++; 
  				 }
  				 if(check == true) 
  				 {
  					 
  					 while(i<y)
  					 {
  						 if(s2.charAt(i) > '0')
  						 {
  							 check2=false;
  							 out.println("<"); break;
  						 }
  						 else
  						 {
  							 check2=true;
  						 }
  						 i++;
  					 }
  				 }
  				 if(check2==true) out.println("=");
  			 }
  		  }
  		   
  		   
  		}
  		out.flush();
  	}
  	static class Pair
  	{
  		int a;
  		int b;
  		Pair(int a , int b)
  		{
  			this.a=a;
  			this.b=b;
  		}
  	}
  	static long gcd(long a , long b)
      {
          if(b==0) return a;
          return gcd(b,a%b);
      }
      
      static long lcm(long a , long b)
      {
          return (a*b)/gcd(a,b);
      }
      
      static long fastPower(long a , long b )
      {
          long res=1;
          while(b>0)
          {
              if((b&1)!=0)
              {
                  res = (res%m * a%m)%m;
              }
              a = (a%m * a%m)%m;
              b=b>>1;
              
          }
          return res;
      }
      
      static long modexp(long x, long n)
  {
      if (n == 0) {
          return 1;
      }
      else if (n % 2 == 0) {
          return modexp((x * x) % m, n / 2);
      }
      else {
          return (x * modexp((x * x) % m, (n - 1) / 2) % m);
      }
  }
   
  
   static long getFractionModulo(long a, long b)
  {
      long c = gcd(a, b);
   
      a = a / c;
      b = b / c;
   
      
      long  d = modexp(b, m - 2);
   
      
      long ans = ((a % m) * (d % m)) % m;
   
      return ans;
  }
  
      public static long power(long x, long y)
    {
        long temp;
        if (y == 0)
            return 1;
        temp = power(x, y / 2);
  
        if (y % 2 == 0)
            return modMult(temp,temp);
        else {
            if (y > 0)
                return modMult(x,modMult(temp,temp));
            else
                return (modMult(temp,temp)) / x;
        }
    }
    static long modMult(long a,long b) {
           return a*b%m;
       }
     static class FastReader {
          BufferedReader br;
          StringTokenizer st;
   
          public FastReader()
          {
              br = new BufferedReader(
                  new InputStreamReader(System.in));
          }
   
          String next()
          {
              while (st == null || !st.hasMoreElements()) {
                  try {
                      st = new StringTokenizer(br.readLine());
                  }
                  catch (IOException e) {
                      e.printStackTrace();
                  }
              }
              return st.nextToken();
          }
   
          int nextInt() { return Integer.parseInt(next()); }
   
          long nextLong() { return Long.parseLong(next()); }
   
          double nextDouble()
          {
              return Double.parseDouble(next());
          }
   
          String nextLine()
          {
              String str = "";
              try {
                  str = br.readLine();
              }
              catch (IOException e) {
                  e.printStackTrace();
              }
              return str;
          }
      }
  }
  