#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
void solve()
{
int n;
cin>>n;
set<int> se[2];
for (int i=0;i<n;i++)
{
int x,s;
cin>>x>>s;s--;
se[s].insert(x);
char ans='?';
string o="<>";
for (int j=0;j<2;j++)
{
if (se[j].size()>se[1-j].size()) continue;
bool pos=1;
auto it=se[j].rbegin(), it1=se[1-j].rbegin();
while (it!=se[j].rend())
{
if ((*it1)<(*it))
{
pos=0;
break;
}
it1++,it++;
}
if (pos)
ans=o[j];
}
cout<<ans<<endl;
}
}
int main()
{
ios::sync_with_stdio(0);
cin.tie(NULL), cout.tie(NULL);
int t=1;
// cin>>t;
while (t--)
solve();
return 0;
}