#define DEBUG
#define OPTIMIZE
//#define PBDS
//#define INTERACTIVE
 
#include <bits/stdc++.h>
using namespace std;
 
const int MAXN = 1e3;
const int INF = 0x3f3f3f3f, MOD = 1000000007;
const long long LINF = LONG_LONG_MAX;
#define INIT(arr, val) fill(arr, arr+(int)(sizeof(arr)/sizeof(arr[0])), val)
#define REP(i, lb, rb, inc) for(int i = (lb); i < (rb); i += inc)
#define RREP(i, rb, lb, dec) for(int i = (rb)-1; i >= (lb); i -= dec)
typedef long long ll;
typedef queue<int> QI;
typedef vector<int> VI;
#define pb push_back
typedef pair<int, int> PII;
typedef pair<double, double> PDD;
#define mp make_pair
#define mt make_tuple
#define F first
#define S second
#define X real()
#define Y imag()
#define ALL(x) x.begin(), x.end()

#define OUT(x) {x; cout<<endl;}
#define READ(a, t) t a; cin >> a
#define println(x) cout << (x); cout << endl
#define READARR(arr, n) REP(___i, 0, (n), 1) cin >> arr[___i]
#define PRINTARR(arr, n) REP(___i, 0, (n), 1) cout << arr[___i] << " ";

#ifdef INTERACTIVE
#    define IOS()
#else
#    define endl '\n'
#    define IOS() cin.tie(0); cout.sync_with_stdio(0); cout.tie(0)
#endif
 
#ifdef DEBUG
#    define dbg(x) x
#else
#    define dbg(x)
#endif
 
#ifdef OPTIMIZE
#    pragma GCC optimize("unroll-loops")
#    pragma GCC optimize("O3")
#    pragma GCC optimize("Ofast")
#endif
 
#ifdef PBDS
#   include <bits/extc++.h>
    using namespace __gbu_pbds;
#endif

void NO() { cout << "-1\n"; exit(0); }

set<string> a;
vector<string> v;

signed main() {
	IOS();
	
	READ(n, int);
	REP(i, 0, n, 1) {
		READ(str, string);
		if (str[0] == '!') {
			a.insert(str);
		} else {
			v.pb(str);
		}
	}
	for(string str : v) {
		str = "!"+str;
		if (a.find(str) != a.end()) {
			cout << str.substr(1, str.size()-1) << endl;
			exit(0);
		}
	}
	cout << "satisfiable" << endl;
}
#include <bits/stdc++.h>
using namespace std;
#define SPEED ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define ll long long
int main()
{
	SPEED
	int n;
	cin >> n;

	vector<string> clean;
	unordered_map<string, int> mp;

	for (int i = 0; i < n; ++i)
	{
		string s;
		cin >> s;

		if (s[0] == '!')
		{
			string s2 = "";
			for (int i = 1; i < s.size(); ++i)
			{
				s2 += s[i];
			}
			mp[s2]++;
		}
		else
		{
			clean.push_back(s);
		}
	}


	for (int i = 0; i < clean.size(); ++i)
	{
		if (mp.count(clean[i]))
		{
			cout << clean[i];
			return 0;
		}
	}

	cout << "satisfiable";

  	return 0;
}