#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (n); i++)
using namespace std;
using P = pair<int, int>;
using ll = long long;

int main(){
	int n;
  	cin >> n;
  	vector<string> s(n);
  	rep(i, n) cin >> s[i];
  
  	unordered_set<string> h(s.begin(), s.end());
  	for(string t : s) if(h.count('!' + t)){
    	cout << t << endl;
      	return 0;
    }
  	
  	cout << "satisfiable" << endl;
}
//BISMILLAH
#include <bits/stdc++.h>
using namespace std;
#define read(x)    freopen(x, "r", stdin);
#define write(x)   freopen(x, "w", stdout);
#define ll long long
#define lli long long int
#define mod 1000000007
#define mx 1000005


         //   #define sazzad

int main()
{
    #ifdef sazzad
read("input.txt");
// write("output.txt");
     #endif


      int a,n,flag=0,sum=0,check,min1= INT_MAX,min2 = INT_MAX,summin= INT_MAX;

      cin>>n;
      a = n;
      vector<int>v;
      vector<int>vv;
      while(a--)
      {
          int x , y;
          cin>>x>>y;
          v.push_back(x);
          vv.push_back(y);

          sum = x+y;

          summin = min(summin,sum);




      }

      for(int i=0;i<v.size();i++)
      {
          if( v[i] < min1 )
          {
              min1 = v[i];
              flag = i;
          }
      }
      //cout<< flag<<endl;
      for(int i=0; i<vv.size();i++ )
      {
          if( i != flag ) min2 = min(min2,vv[i]);
      }
     // cout<<min2<<endl;
      int res = max(min1,min2);
      cout<< min(summin,res)<<endl;


}
