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

int main() {
	int N; cin >> N;
	multiset<string> st;
	for (string s; cin >> s;) {
		st.insert(s);
	}
	
	for (const string &s: st) {
		if (st.count('!' + s)) {
			cout << s << '\n';
			return 0;
		}
	}
	cout << "satisfiable\n";
}
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <string>
#include <bits/stdc++.h>
#include <queue>
#include <math.h>
#include <bitset>
#include <map>
#include <vector>
#include <cstdio>
#include <climits>
#define white 0
#define gray 1
#define black 2
#define LIMIT (1<<30)
#define MOD 1000000007
//#define MOD 998244353
#define ll long long
using namespace std;

//const ll INF = LLONG_MAX;
//cout << fixed << setprecision(10) << ans << endl;
//pair<ll, ll> vec[4] = {make_pair(1, 0), make_pair(0, 1), make_pair(-1, 0), make_pair(0, -1)};

int main(){
    int n;
    cin >> n;
    cout << n - 1 << endl;
}
