#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>

using namespace std;

typedef long long ll;

int main() {
	ios::sync_with_stdio(false); cin.tie(NULL);

	priority_queue <string> a, b;

	int n; cin >> n;

	for (int i = 0; i < n; i++) {
		string c; cin >> c;
		if (c[0] == '!') {
			string q;
			for (int j = 1; j < c.size(); j++) {
				q += c[j];
			}
			b.push(q);
		}
		else {
			a.push(c);
		}
	}
	while (!b.empty() && !a.empty()) {
		if (a.top() == b.top()) {
			cout << a.top();
			return 0;
		}
		else if (a.top() < b.top()) {
			b.pop();
		}
		else {
			a.pop();
		}
	}
	printf("satisfiable");
}
#include<bits/stdc++.h>

using namespace std;
using   ll = long long;
using   ld = long double;

#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

#define pb          	push_back
#define mp          	make_pair
#define F           	first
#define S           	second
#define pll				pair<int , int>
#define int             long long int
#define endl            "\n"


#define ALL(v)      	v.begin(),v.end()
#define ALLR(v)     	v.rbegin(),v.rend()
#define pii         	3.14159265358979323
#define inf     		LLONG_MAX
#define ones(x)     	__builtin_popcount(x)
#define fill(a,b)   	memset(a,b,sizeof(a))
#define mod 			1000000007
#define hell            998244353

ll mod_pow(ll a,ll b,ll m)
{
    ll res = 1;
    while(b)
    {
        if(b&1)
        {
        	res=(res*a) % m;
        }
        a=(a*a) % m;
        b>>=1;
    }
    return res;
}

ll mod_inverse(int a , int m)
{
	return mod_pow(a , m - 2 , m);
}

int get(int n) {
	int t = n % 10 + (n/10) % 10 + (n / 100);
	return t;
}

void solve() {
	int n;
	
	cin >> n;
	
	map<string , int> f;
	
	string s[n];
	
	for(int i = 0; i < n; ++i) {
		cin >> s[i];
		
		f[s[i]] += 1;
	}
	
	for(int i = 0; i < n; ++i) {
		if(f.find('!' + s[i]) != f.end()) {
			cout << s[i];
			return;
		}
	}
	
	cout << "satisfiable\n";
}

signed main() {
	fast;
   
    int t = 1;

	//cin >> t;

    while(t--) {
        solve();
    }

    return 0;
}
