#include<bits/stdc++.h> 
using namespace std; 

int main(){
	int n; 
	cin >> n;
	string s[n];  
	map< string , int > mp; 
	for(int i = 0 ;i < n ;i++){
		cin >> s[i]; 
		if(s[i][0] == '!') mp[s[i].substr(1)]++; 
	}
	for(int i = 0 ; i < n ; i++){
		if(s[i][0] != '!' && mp.find(s[i]) != mp.end()){
			cout << s[i] << endl;
			return 0; 
		} 
	}
	cout << "satisfiable" << endl; 
	
	return 0; 
}

//-- In the name of ALLAH --
// We're nothing and you're everything.
// Ya Ali!
#include<bits/stdc++.h>
using namespace std;

#define      pai              acos(-1)
#define      ff               first
#define      ss               second
#define      ll               long long
#define      pb               push_back
#define      mp               make_pair
#define      pll              pair<ll,ll>
#define      sz(a)            (ll)a.size()
#define      endl             "\n"
#define      gcd(a, b)        __gcd(a, b)
#define      lcm(a, b)        ((a*b)/gcd(a,b))
#define      all(vec)         vec.begin(),vec.end()
#define      ms(a, b)         memset(a,b,sizeof(a))
#define      rep(i,n)         for(int i= 0; i < int(n); i++)
#define      rep1(i,n)        for(int i= 1; i <= n; i++)
#define      TEST_CASE(t)     for(int zz=1;zz<=t;zz++)
#define      PRINT_CASE       printf("Case %d: ",zz)
#define      fii              freopen("input.txt","r",stdin);
#define      foo              freopen("output.txt","w",stdout);
#define      boom             ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);

const ll M   = 1e9+7;
const ll mxn = 1e5+7;


int  main()
{
    ll i,j,k,a,b,c,d,n,m,t,x,y,z,u,v;
    string s1,s2,ans;
    set<string>st;
    map<string,bool>vis;
    cin>>n;
    for(i=1;i<=n;i++)
    {
        cin>>s1;
        vis[s1]=true;
        if(s1[0]!='!')
        {
            st.insert(s1);
        }
    }
    bool flag=true;
    for(auto s:st)
    {
        s2="!"+s;
        if(vis[s2])
        {
            ans=s;
            flag=false;
            break;
        }
    }
    if(flag)
    {
        cout<<"satisfiable"<<endl;
    }
    else
    {
        cout<<ans<<endl;
    }
    return 0;
}
