#include<bits/stdc++.h>
using namespace std;
int read(){
	int x=0,f=1;char c=getchar();
	while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}
	while('0'<=c&&c<='9'){x=x*10+c-'0';c=getchar();}
	return x*f;
}
int n,flg[200005];string s[200005];char ch[15];
map<string,int>M;
int main(){
	n=read();
	for(int i=1;i<=n;++i){scanf("%s",ch);if(ch[0]=='!')s[i]=ch+1,flg[i]=1;else s[i]=ch;}
	for(int i=1;i<=n;++i)if(!flg[i])M[s[i]]=1;
	for(int i=1;i<=n;++i)if(flg[i]&&M[s[i]])return cout<<s[i],0;
	puts("satisfiable");
}
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<iostream>
#include<cstdint>
#include<cstddef>
#include<vector>
#include<set>
#include<map>
#include<algorithm>
//#include<atcoder/all>
//using namespace atcoder;
using namespace std;
using i32 = int_fast32_t;
using i64 = int_fast64_t;
using usize = size_t;
using u32 = uint_fast32_t;
using u64 = uint_fast64_t;
template<typename T>
using vec = vector<T>;
#define rep(i, n) for (i64 i = 0; i < (i64)(n); ++i)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
using P = pair<i64,i64>;
void solve(){
}
int main(){
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    i64 n;
    cin >> n;
    map<string,i64> mp;
    vec<string> s(n);
    rep(i,n){
        cin >> s[i];
        mp[s[i]]++;
    }
    rep(i,n){
        string now = s[i];
        i64 cnt = 0;
        if(mp[now] >= 1){
            cnt++;
        }
        string t = "!";
        t = t + now;
        if(mp[t] >= 1)cnt++;
        if(cnt == 2){
            cout << now << endl;
            return 0;
        }
    }
    cout << "satisfiable" << endl;
}