#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
#define int ll
typedef long double ld;

typedef pair<int,int> pii;
#define x first
#define y second

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

    int n;
    cin>>n;
    set<string> yes,no;
    while(n--)
    {
        string s;
        cin>>s;
        if(s.front()=='!')
        {
            s.erase(s.begin());
            no.insert(s);
        }
        else
            yes.insert(s);
        if(yes.count(s)&&no.count(s))
            cout<<s,exit(0);
    }
    cout<<"satisfiable";
}


#include<bits/stdc++.h>
using namespace std;
#define vec vector<int>
#define vecp vector<pair<int,int>>
#define ll long long
#define ull unsigned long long
#define pb push_back
#define fr first
#define sc second
#define fr1(i,a,b) for(int i=a;i<b;i++)
#define fr2(i,a,b) for(int i=a;i>=b;i--)
#define fr3(i,a,b) for(int i=a;i<=b;i++)
#define umap unordered_map<int,int>
#define omap map<int,int>
#define uset unordered_set<int>
#define oset set<int>
#define pr pair<int,int>
#define endl "\n"
#define mod 1000000007
#define mp make_pair
#define all(v) v.begin(),v.end()

void solve()
{
  int n;
  cin>>n;
  vector<string> s(n);
  fr1(i,0,n)
  {
    cin>>s[i];
  }
  unordered_set<string> s1;
  fr1(i,0,n)
  {
    s1.insert(s[i]);
  }
  for(auto i=s1.begin();i!=s1.end();i++)
  {
    string S=*i;
    if(s1.count('!'+S)==1)
    {
      cout<<S<<endl;
      return;
    }
  }
  cout<<"satisfiable"<<endl;
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t=1;
    //cin>>t;
    fr3(i,1,t){
        solve();
    }
   return 0;
}


