#include <bits/stdc++.h>
using namespace std;
struct query
{
set<int>a;//available from other side
set<int>le;//leftovers
set<int>b;//used
map<int,int>pr;
void upd()
{
while (le.size())
{
int f1=*le.begin();
auto z=a.lower_bound(f1);
// cout<<f1<<endl;
if (z!=a.end())
{
int f=*z;
pr[f1]=f;
b.insert(f1);
a.erase(f);
le.erase(f1);
}
else
break;
}
}
void ins(int x)
{
auto z=a.lower_bound(x);
if (z==a.end())
le.insert(x);
else
{
int f=*z;
pr[x]=f;
b.insert(x);
a.erase(f);
}
// upd();
}
void ins1(int x)
{
auto z=b.lower_bound(x);
if (z==begin(b))
a.insert(x);
else
{
z--;
int f=*z;
if (pr[f]<x)
a.insert(x);
else
{
a.insert(pr[f]);
pr[f]=x;
}
}
// if (x==3)
// cout<<"fah\n";
upd();
}
};
inline void solve()
{
int n;
cin>>n;
query ans[2]={};
for (int i=0;i<n;i++)
{
int r,s;
cin>>r>>s;
s--;
ans[s].ins(r);
ans[1-s].ins1(r);
bool w=ans[0].le.size(),x=ans[1].le.size();
if (w&&x)
cout<<"?\n";
else if (w)
cout<<">\n";
else
cout<<"<\n";
}
}
int main()
{
ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
int t=1;
// cin>>t;
for (int i=1;i<=t;i++)
{
solve();
}
}