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.io.*;
  import java.math.*;
  
  public class Substitute{
   //Global declarations
   final static FastReader in = new FastReader();
   final static PrintWriter out = new PrintWriter(System.out);
    
   
   public static char helperFunction(int x, int p, int x2, int p2) {
  	
  	//Long range is -10^18 to 10^18 and is 64 bit (8 bytes)
  	//Integer range is ~~ -2 * 10^9(-2^31) to 2 * 10^9(2^31 - 1) and is 32 bit (4 bytes)  
  	
  		int i,n,m;
  		StringBuilder sb = new StringBuilder("");
  		sb.append(x);
  
  		StringBuilder sb2 = new StringBuilder("");
  		sb2.append(x2);
  		
  		
  		
  		if((sb.length()+p) > (sb2.length()+p2))
  		return '>';
  		
  		else if((sb.length()+p) < (sb2.length()+p2))
  		return '<';
  		
  		
  		if(sb.length()>sb2.length()){
  			m = sb.length()-sb2.length();
  			for(i=0;i<m;++i)
  				sb2.append('0');
  		}
  		
  		else if(sb2.length()>sb.length()){
  			m = sb2.length()-sb.length();
  			for(i=0;i<m;++i)
  				sb.append('0');
  		} 
  		
  		
  		if(Integer.parseInt(sb.toString()) > Integer.parseInt(sb2.toString()))
  			return '>';
  		
  		else if(Integer.parseInt(sb.toString()) < Integer.parseInt(sb2.toString()))
  			return '<';
  		
  		return '=';
  		
   }
   
    
   public static void main(String ... args) throws IOException {   
  	/*
  	//to measure the execution time of the program we use the below line of code	
  	long start = System.nanoTime();
  	
  	//p --> prime number array, there are total 78498 primes below one million
  	int p[] = new int[78498];
  	
  	//n is below one million, we are generating all the prime numbers below one million
  	int n = 999999,i=0,j,ct=0,sum=0,temp=0,res=0,p1=0,p2=0;
  	
  	boolean prime_array [] = new boolean [n+1];
  	
  	while(i<=n)
  	{
  		prime_array[i]=true;
  		i++;
  	}
  	prime_array[0]=false;
  	prime_array[1]=false;
  	i=2;
  	while(i*i<=n)
  	{
  		if(prime_array[i]==true)
  		{
  			for(j=2;i*j<=n;j++)
  			prime_array[i*j]=false;
  		}
  		i++;
  	}
  	
  	for(i=0;i<=n;i++)
  	{
  		if(prime_array[i]==true)
  		p[ct++] = i;
  	}
  	
  	//out.println(Arrays.toString(p));
  	
  	j=0;
  	
  	for(i=0;i<78498;++i){
  		sum = p[i];
  		for(j=i+1;j<78498;++j){
  			sum +=p[j];
  			
  			if(sum>=1000000)
  			break;
  			
  			if(temp<j-i+1 && BigInteger.valueOf(sum).isProbablePrime(1)){
  				temp = j-i+1;
  				p1 = i;
  				p2  = j;
  				res = sum;
  			}
  		}
  	}
  	
  	
  	out.println(res);
  	
  	//range between 3rd prime to 545th prime
  	out.println(p1 + " " + p2);
  	
  	//in the end we also measure the time
  	long end = System.nanoTime();
  	
  	out.println(end-start);*/
  	
  	
  	
  	//out.println(helperFunction());
  	
  	/*
  	int n = in.nextInt();
  	
  	int i;
  	int a[] = new int[n];
  	int b[] = new int[n];
  	
  	for(i=0;i<n;++i){
  		a[i] = in.nextInt();
  		b[i] = in.nextInt();
  	}
  	
  	*/
  	
  	
  	int tt = in.nextInt();
  	
  	while(tt-->0){
  		
  		int x = in.nextInt();
  		int p = in.nextInt();
  		
  		int x2 = in.nextInt();
  		int p2 = in.nextInt();
  		
  		
  		out.println(helperFunction(x,p,x2,p2));
  		
  		
  		
  		
  		
  		
  		
  	}
  	
  	
  	
  	out.close();
  }
   
   
   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;
  		}
     }
   }
   
   
  