#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
#define ll long long
const int maxn=100005;
int main()
{
// freopen("in.txt","r",stdin);
int T;
double a,b,c,d;
scanf("%d",&T);
double temp1,temp2;
while(T--)
{
scanf("%lf%lf%lf%lf",&a,&b,&c,&d);
temp1=b*log10(a),temp2=d*log10(c);
if(temp1>=temp2)
printf(">
");
else
printf("<
");
}
}