#include<iostream>
#include<cstring> 
#include<set>

using namespace std;

int n;
string ss;
set<string> s;

int main()
{
    cin>>n;
    for(int i=0;i<n;i++){
    cin>>ss;
    
    if(ss[0]=='!'){
        string t=ss;
        t.erase(t.begin());
        if(s.count(t)){
            cout<<t;
            return 0;
        }
        
    }
    else {
        string t="!"+ss;
        if(s.count(t))
        {
            cout<<ss<<endl;
            return 0;
        }
    }
    s.insert(ss);
    }
    cout<<"satisfiable"<<endl;
    return 0;
    
}
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i, n) FOR(i, 0, n)
#define FOR(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; ++i)
#define ALL(obj) (obj).begin(), (obj).end()
#define ALLR(obj) (obj).rbegin(), (obj).rend()
#define CEIL(a, b) ((a - 1) / b + 1)

void solve() {
    int N;
    cin >> N;
    map<string, int> mp;
    REP(i, N) {
        string t;
        cin >> t;
        mp[t]++;
    }
    for (auto &x : mp) {
        if (x.first[0] != '!') {
            if (mp["!" + x.first] > 0) {
                cout << x.first << endl;
                return;
            }
        }
    }
    cout << "satisfiable\n";
}

signed main() {
    cin.tie(nullptr)->sync_with_stdio(false);
    solve();
}
