#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#define IO(i, o) freopen(i, "r", stdin), freopen(o, "w", stdout)
using namespace __gnu_pbds;
using namespace std;

int n;
string s[200000];

int main(){
    //IO("input.txt", "output.txt");
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin >> n;
    for(int i = 0; i < n; i++) cin >> s[i];
    set<string> cov;
    sort(s, s + n);
    for(int i = 0; i < n; i++)
        if(s[i][0] == '!') cov.insert(s[i]);
        else{
            s[i] = "!" + s[i];
            if(cov.find(s[i]) != cov.end()){
                cout << s[i].substr(1, s[i].length() - 1) << '\n';
                return 0;
            }
        }
    cout << "satisfiable\n";
    return 0;
}
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main() {
  int n;
  cin >> n;
  vector<string> s(n);
  rep(i, n) cin >> s[i];

  set<string> st;
  rep(i, n) st.insert(s[i]);
  
  rep(i, n) {
    if (st.count('!' + s[i])) {
      cout << s[i] << endl;
      return 0;
    }
  }
  cout << "satisfiable" << endl;
  return 0;
}