#include <bits/stdc++.h>
using namespace std;
const int nx=1e5+5;
int n, x, t;
set<int> a, b;
bool check(set<int> &x, set<int> &y)
{
if (y.empty()) return 1;
auto itrx=prev(x.end()), itry=prev(y.end());
while (itry!=y.begin())
{
if (*itrx<*itry) return 0;
itrx--, itry--;
}
if (*itrx<*itry) return 0;
return 1;
}
int main()
{
cin.tie(NULL)->sync_with_stdio(false);
cin>>n;
for (int i=1; i<=n; i++)
{
cin>>x>>t;
if (t==1) a.insert(x);
else b.insert(x);
if (a.size()>=b.size()&&check(a, b)) cout<<">\n";
else if (b.size()>=a.size()&&check(b, a)) cout<<"<\n";
else cout<<"?\n";
}
}