#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;

#define fastio			ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define int             long long
#define double 			long double
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define gcd(x,y)		__gcd(x,y)
#define MOD             (int)(1e9 + 7)
#define INF             (int)9e18
#define ps(x,y)         fixed<<setprecision(y)<<x
int fastpow				(int a, int b, int m = MOD) { int res = 1; a %= m;
						while (b > 0) { if (b & 1) res = (res * a) % m; a = (a * a) % m; b >>= 1; } return res;}
#define inv(a) 			fastpow(a, MOD - 2)
mt19937                 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef tree            <int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;

 
int32_t main()
{
    fastio;
    int N;
    cin>>N;
    vector<string>v;
    for(int i=0;i<N;i++)
    {
      string str;
      cin>>str;
      v.push_back(str);
    }

    unordered_map<string,int>um;
    for(int i=0;i<N;i++)
    {
    	string s=v[i];
    	um[s]++;
    }
    for(int i=0;i<N;i++)
    {
    	string s=v[i];
    	if(s[0]=='!')
    	{
    		string s2=s.substr(1,s.size()-1);
    		if(um[s2]>0)
    		{
    			cout<<s2<<"\n";
    			return 0;
    		}
    	}
    }
    cout<<"satisfiable\n";
    return 0;
}
#include <bits/stdc++.h>
using namespace std;

#define FORI(i, a, b) for (int i = (int)a; i <= (int)b; i++)
#define FORD(i, a, b) for (int i = (int)a; i >= (int)b; i--)
#define PB push_back
#define ALL(v) v.begin(),v.end()
#define OJ \
    freopen("input.txt", "r", stdin); \
    freopen("output.txt", "w", stdout);
#define FIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<ll> vll;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<pii> vpii;

int main() {
    int n; cin >> n;
    set<string> st;
    bool has = false;
    string ans = "";
    FORI(i, 0, n - 1) {
        string str; cin >> str;
        if (str[0] == '!') {
            if (st.count(str.substr(1))) {
                has = true; 
                ans = str.substr(1);
                break;
            }
        } else {
            if (st.count("!" + str)) {
                has = true;
                ans = str;
                break;
            }
        }
        st.insert(str);
    }
    if (has) cout << ans << endl;
    else cout << "satisfiable" << endl;
    return 0;
}