#include <bits/stdc++.h>

using namespace std;

int main(){
    int n; cin >> n;
    vector<string> v;
    unordered_set<string> set;
    for(int i=0; i<n; i++){
        string s; cin >> s;
        if(s[0] != '!') v.push_back(s);
        set.insert(s);
    }
    for(auto &s : v){
        if(set.count('!' + s)){
            cout << s;
            return 0;
        }
    }
    cout << "satisfiable";
    return 0;
}
#include<bits/stdc++.h>
using namespace std;

const int N = 2e5 + 10;
string s[N];
map<string, int> mp;
int n;

int main()
{
	cin >> n;
	for(int i = 0; i < n; ++i) cin >> s[i];
	sort(s, s + n);
	int i = 0;
	for(; i < n; ++i) {
		if(s[i][0] != '!') break;
		mp[s[i]] = 1;
	}
	
	for(; i < n; ++i) {
		if(mp.count("!" + s[i])) {
			cout << s[i] << "\n";
			return 0;
		}
	}
	
	return 0 * printf("satisfiable");
}