#include<bits/stdc++.h>
#include<cstring>
using namespace std;
#define PMax 100000000
#define GNode 100
using ll= long long;
map<string ,int> chk;
int main()
{
    ll tc;

    cin>>tc;
    int flg=0;
      string s,ans;
    while(tc--){

    cin>>s;
    if(s[0]=='!'){
            s.erase(0, 1);
        if(chk[s]==1){
            flg=1;

            ans=s;}
        else{
        chk[s]=2;
        }

    }
    else{
        if(chk[s]==2){
            flg=1;

            ans=s;
    }
        else{
        chk[s]=1;
        }

    }

    }

if(flg) {cout<<ans<<endl;}
else {cout<<"satisfiable"<<endl;}


}



#include <bits/stdc++.h>
using namespace std;
#define rep(i,n)for(int i=0;i<(n);i++)
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define pb push_back
using ll = long long;
using P = pair<int, int>;

int main(){
    int n; 
    cin >> n;
    set<int> a;
    rep(i,n) {
        int p;
        cin >> p;
        a.insert(p);
    }
    while(1){
        int max = *a.rbegin();
        int min = *a.begin();
        if(max == min) break;
        a.erase(max);
        a.insert(max - min);
        /*
        cout << " " << endl;
        cout << max << endl;
        cout << min << endl;
        */
    }
    cout << *a.begin() << endl;
}