#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define PI 3.14159265358979

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

   ll t=1;
   //cin>>t;
   while(t--){
     ll a,b,c;
     cin>>a>>b>>c;
     if(a*b>0)
     {
         if(c%2==0)
         {
             if(abs(a)>abs(b))
                cout<<">";
             else if(abs(a)==abs(b))
                cout<<"=";
             else
                cout<<"<";
         }
         else
         {
             if(a<0)
             {
                 if(abs(a)>abs(b))
                cout<<"<";
             else if(abs(a)==abs(b))
                cout<<"=";
             else
                cout<<">";
             }
             else
             {
                if(abs(a)>abs(b))
                cout<<">";
             else if(a==b)
                cout<<"=";
             else
                cout<<"<";
             }
         }
     }
     else
     {
         if(c%2==0)
         {
              if(abs(a)>abs(b))
                cout<<">";
             else if(abs(a)==abs(b))
                cout<<"=";
             else
                cout<<"<";
         }
         else
         {
             if(a>b)
                cout<<">";
              else if(a==b)
                cout<<"=";
             else
                cout<<"<";
         }
     }
      cout<<"\n";
   }
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  int minimum =-1;
  cin>> N;  
  
  for (int i=0 ;i< N ;i++){
    int a1 ,p1 ,x1;
    cin >> a1 >> p1 >> x1;
    if (a1<x1){
      minimum = p1;
      break;
    }
    
  }
  if (minimum !=-1){
    for (int i=0; i<N;i++){
    int a2, p2, x2;
    cin >> a2>> p2 >> x2;
        if (a2 <x2){
         minimum =min (p2,minimum);  
          
      }
      
    }
  }
  cout << minimum << endl; 
}
    
    
    