#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using ll = long long;
using vl = vector<long long>;
using vi = vector<int>;

int main(){
    int n; cin >> n;
    set<string> s1,s2;
    string ans = "satisfiable";
    vector<string> ss(n);
    for(int ix=0;ix<n;ix++) cin >> ss.at(ix);
    for(int ix=0;ix<n;ix++){
        string tmp = ss.at(ix);
        if(tmp.at(0) == '!'){
            if(s2.count(tmp.substr(1))){
                ans = tmp.substr(1);
                break;
            }
            else{
                s1.insert(tmp.substr(1));
            }
        }
        else{
            if(s1.count(tmp)){
                ans = tmp;
                break;
            }
            else{
                s2.insert(tmp);
            }
        }
    }
    cout << ans << endl;
}
#include <bits/stdc++.h>
#define INF INT_MAX
#define ll  long long
#define ull unsigned long long
#define rep(i,n) for(ll i=0; i<n; ++i)
#define FOR(i, s, e) for(ll i=s; i<e; ++i)
#define MOD 1000000007
using namespace std;
template<class T> inline bool chmin(T& a, T b) { if(a>b) {a=b; return true;} return false;}
template<class T> inline bool chmax(T& a, T b) { if(a<b) {a=b; return true;} return false;}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N; cin >> N;
  vector<string> S;
  vector<string> dict;
  rep(i,N) {
    string s;
    cin >> s;
    if(s[0] == '!') dict.push_back(s.substr(1));
    else S.push_back(s);
  }
  sort(dict.begin(), dict.end());
  for(auto s:S) {
    if(binary_search(dict.begin(), dict.end(), s)) {
      cout << s << endl;
      return 0;
    }
  }
  cout << "satisfiable" <<endl;
}