#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <cmath>
#include <algorithm>
#include <climits>
#include <iomanip>
#define endl "\n"
#define debug(x) cout << #x << " : " << x << endl;
#define debug2(x, y) cout << #x << " : " << x  << ", " << #y << " : " << y << endl;
#define FASTIO ios_base::sync_with_stdio(false),cin.tie(0);
typedef long long ll;
using namespace std;
 

int main()
{
	FASTIO
	
	int n;
	cin >> n;
	
	map <string, bool> mp;
	map <string, bool> mp_r;
	for(int i = 0; i < n; i ++)
	{
		string s;
		cin >> s;
		
		if(s[0] == '!')
		{
			s.erase(0, 1);
			mp_r[s] = true;
		}
		else
			mp[s] = true;
		if(mp[s] == true && mp_r[s] == true)
		{
			cout << s << endl;
			return 0;
		}
	}
	
	cout << "satisfiable" << endl;
} 
/* 

	CODE TEMPLATE APRATIM

*/

#include <bits/stdc++.h>
#pragma optimize("O3")
using namespace std;
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define ll long long int
#define veci vector<ll>
#define it map<string, vv>::iterator
#define MOD 1000000007
#define N (ll)3e+5
#define test int T;cin>>T;while(T--)
#define nl "\n"
#define FULL(iii) iii.begin(),iii.end()
#define setbit(_) __builtin_popcount(_)
#define INF 9223372036854775807 
#define TOUPR(str) transform(str.begin(), str.end(),str.begin(), ::toupper)
#define TOLWR(str) transform(str.begin(), str.end(),str.begin(), ::tolower)
#define pb push_back
#define len(s) s.length()
#define pb push_back
#define eb emplace_back
#define S second
#define F first
#define len(s) s.length()
#define coutp cout<<setprecision(15)
#define pow(a,b) (ll)(pow(a,b)+0.5)
#define bin(x) stoull(x,0,2)
#define lld long double
#define yy cout<<"Yes"<<nl;
#define nn cout<<"No"<<nl;
map<ll,ll> mapy;
veci mapv;
class Graph
{
	private:
	map<ll,veci>m;
	public:
	void edges(ll source, ll destination)
	{
		m[source].pb(destination);
		m[destination].pb(source);
	}
	vector<ll> BFS(ll s)
	{
		queue<ll> q;
		map<ll,ll>vis;
		veci x;
		vis[s]=1;
		q.push(s);
		while(!q.empty())
		{
			s=q.front();x.pb(s);
			q.pop();
			for(auto node:m[s])
			{
				if(!vis[node])
				vis[node]=1,q.push(node);
			}
		}
		return x;
		
	}
	
};
ll powi(ll a,ll b)
{
	if(b==0) return (ll)1;
	if(b==1) return a;
	else if(b%2) return a*powi(a,b-1);
	else return powi(a*a,b/2);
}
ll b(vector<ll>a,ll n)
{
	ll l=0,r=n-1;
	while(l<=r)
	{
		int m = r-(r-l)/2;
		if(a[m]==0)
			l = m+1;
		else{
			if(a[m-1]==0 || m==0) return m;
			else r = m-1;
		}
	}
	return -1;
}

bool prime(ll n)
{
	ll i;
	if(n==0 || n==1) return 0;
		for(i=2;i*i<=n;i++)
		{
			if(n%i==0) return 0;
		}
		return 1;
}
ll nearest_prime(ll n)
{
	ll i;
	for(i=n+1;;i++)
	{
		if(prime(i)){
			if(!prime(i-n)) return i-n;
		}
	}
	return 0;
}

void primeFactors(ll n) 
{
	ll i;
	while(n%2==0)
    {
    	mapv.pb(2);
    	n/=2; 
    }
    for(i=3;i*i<=n;i=i+2)
    {
    	while (n%i==0)
    	{
    		mapv.pb(i);n/=i;
    	}
    }
    if(n>2)
    mapv.pb(n);
} 
// void rev(int a, int b, veci a)
// { int i;
// 	for(i=a;i<b;i++)
// 	{
// 		a[i]=a[b-i-1];
// 	}
// 	for(auto i:a)cout<<i<<" ";
// }
map<string,int> vis;
map<string,vector<string>>stry;
//vector<string> stry[1000];
void dfs(string v)
{
	vis[v]=1;
	//cout<<v<<" ";
	for(auto i:stry[v])
	{
		if(vis[i]==0)
		dfs(i);
	}
}
ll solve(ll dp[][1000], ll a[],ll low,ll high,ll turn)
{ 
    if (low == high) 
        return a[low] * turn; 
    if (dp[low][high] != 0) 
        return dp[low][high];
    dp[low][high] = max(a[low] * turn + solve(dp, a,  
                            low + 1, high, turn + 1), 
                        a[high] * turn + solve(dp, a,  
                           low, high - 1, turn + 1)); 
  
    return dp[low][high]; 
}
int search(ll n)
{
	ll i;
	string s=to_string(n);
	for(i=0;i<s.size();i++)
	{
		if(s[i]!='0')
		{
			if(n%(s[i]-'0')!=0)
			return 0;
		}
	}return 1;
}
int main() {	
	fio;
	//test
	{
		ll n,i;
		cin>>n;
		set<string> s;
		string x;
		vector<string> a;
		for(i=0;i<n;i++) cin>>x,a.pb(x),s.insert(x);
		
		//for(auto i:s) cout<<i<<" ";
		
		
		for(i=0;i<n;i++)
		{
		//	if(a[i][0]!='!')
			{
				string x=a[i];
				a[i]='!'+a[i];
				if(s.find(a[i])!=s.end())
				{
					cout<<x;
					return 0;
				}
				
			}

		}
		cout<<"satisfiable";
	}
}
	
/*

4
1 2 4 7

7
1 2 4 8 10 12 6


7
1 2 3 4 5 6 8

*/


