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.util.*;
   import java.lang.*;
   import java.io.*;
  
  public class A_Long_Comparison
   {
       static int M = 1_000_000_007;
       static final PrintWriter out =new PrintWriter(System.out);
       static final FastReader fs = new FastReader();
       static boolean prime[];
       public static void main (String[] args) throws java.lang.Exception
       {
             
             int t= fs.nextInt();
           aaa:  for(int i=0;i<t;i++)
             {
                 long a=fs.nextLong();
                 long b=fs.nextLong();
                 long c=fs.nextLong();
                 long d=fs.nextLong();
                 long da=0;
                 long aa=a;
                 int dda=0;
                 int ddc=0;
                 while(aa!=0){
                     da++;
                     aa=aa/10;
                     if(a!=0&&a%10==0)
                     a=a/10;
                 }
                 aa=c;
                 long dc=0;
                 while(aa!=0){
                     dc++;
                     aa=aa/10;
                     
                     if(c!=0&&c%10==0)
                     c=c/10;
                 }
                 da=da+b;
                 dc=dc+d;
                // System.out.println(a+" "+c);
                 if(da<dc)
                 out.println("<");
                 else if(da>dc)
                 out.println(">");
                 else if(da==dc){
                     ArrayList<Integer> bl = new ArrayList<>();
                     ArrayList<Integer> bll = new ArrayList<>();
                     ArrayList<Integer> al = new ArrayList<>();
                     ArrayList<Integer> all = new ArrayList<>();
                     while(a!=0){
                         bl.add((int)a%10);
                         a=a/10;
                     }
                     while(c!=0){
                         bll.add((int)c%10);
                         c=c/10;
                     }
                     for(int j=bl.size()-1;j>=0;j--){
                         al.add(bl.get(j));
                     }
                     for(int j=bll.size()-1;j>=0;j--){
                      all.add(bll.get(j));
                  }
                         for(int j=0;j<Math.min(al.size(),all.size());j++){
                             if(al.get(j)>all.get(j)){
                              out.println(">");
                              continue aaa;
                             }else if(al.get(j)<all.get(j)){
                              out.println("<");
                              continue aaa;
                             }
                         }
                         if(al.size()>all.size()){
                          out.println(">");
                          continue aaa;
                         }else if(al.size()<all.size()){
                          out.println("<");
                          continue aaa;
                         }
                         out.println("=");
                     
                 }
                 
             }
             out.flush();
    }
    public static long power(long x, long y)
    {
        long temp;
        if (y == 0)
            return 1;
        temp = power(x, y / 2);
        System.out.println(temp);
        if (y % 2 == 0)
            return (temp*temp);
        else {
            if (y > 0)
                return (x*temp*temp);
            else
                return (temp*temp)/ x;
        }
    }
    static void sieveOfEratosthenes(int n)
      {
           prime = new boolean[n + 1];
          for (int i = 0; i <= n; i++)
              prime[i] = true;
              prime[0]=false;
              if(1<=n)
              prime[1]=false;
          for (int p = 2; p * p <= n; p++)
          {
              
              if (prime[p] == true)
              {
                 
                  for (int i = p * p; i <= n; i += p)
                      prime[i] = false;
              }
          }
      }
           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;
           }
   int [] arrayIn(int n) throws IOException
       {
           int  arr[] = new int[n];
           for(int i=0; i<n; i++)
           {
               arr[i] = nextInt();
           }
           return arr;
       }
       }
       
       public static class Pairs implements Comparable<Pairs>
       {
           int value,index;
           Pairs(int value, int index)
           {
               this.value = value;
               this.index = index;
           }
           public int compareTo(Pairs p)
           {
               return Integer.compare(this.value, p.value);
           }
       }
       static final Random random = new Random();
    
       static void ruffleSort(int arr[])
       {
           int n = arr.length;
           for(int i=0; i<n; i++)
           {
               int j = random.nextInt(n),temp = arr[j];
               arr[j] = arr[i];
               arr[i] = temp;
           }
           Arrays.sort(arr);
       }
       static long nCk(int n, int k) {
           return (modMult(fact(n),fastexp(modMult(fact(n-k),fact(k)),M-2)));
       }
    
       static long fact (long n) {
    
           long fact =1;
           for(int i=1; i<=n; i++) {
               fact = modMult(fact,i);
           }
           return fact%M;
       }
    
       static long modMult(long a,long b) {
           return a*b%M;
       }
    
       static long fastexp(long x, int y){
           if(y==1) return x;
    
           long ans = fastexp(x,y/2);
           if(y%2 == 0) return modMult(ans,ans);
           else return modMult(ans,modMult(ans,x));
       }
   }