/*
ID: aravcha1
TASK: gift1
LANG: C++                 
*/

#include <bits/stdc++.h>

using namespace std;
using ll = long long;

using str = string; 
using vi = vector<int>;
using pi = pair<int,int>;
using vpi = vector<pi>;
using si = set<int>;


#define f first
#define s second
#define sz(x) (int)(x).size()
#define pb push_back
#define all(x) begin(x), end(x)
#define sor(x) sort(all(x))

#define Trav(a,x) for (auto& a: x)
#define For(i,a,b) for (int i = (a); i < (b); ++i)

void setIO(string name = "") { // name is nonempty for USACO file I/O
    ios_base::sync_with_stdio(0); cin.tie(0); // see Fast Input & Output
    if(sz(name)){
        freopen((name+".in").c_str(), "r", stdin); // see Input & Output
        freopen((name+".out").c_str(), "w", stdout);
    }
}

/*  
    angry cows - 2016 jan
    bull in a china shop - us open 2016
    field reduction - us open 2016
    modern art - 2017 us open
    milk measurement - 2017 dec
    hoofball - 2018 feb
    taming the herd - 2018 feb
    milking order - 2018 us open
    the bucket list - 2018 dec
    back and forth - 2018 dec
    sleepy cow sorting - 2019 jan
    the great revegetation - 2019 feb
    milk factory - 2019 us open 
    cow evolution - 2019 us open
    race - 2020 jan
    swapity swap - 2020 feb
    all of us open 2020
    STUCK IN A RUT - 2020 dec (oi oi oi)

    DONE
    ~boring ~simple ~skipped    blocked billboard || - 2018 jan
    ~boring ~simple ~skipped    measuring traffic - 2019 feb
    ~i know too much already    guess the animal - 2019 jan 
    */
// rect \/\/\/\/    
//{
// struct Rect {
//     int x1,y1,x2,y2;
//     int area() { return (y2-y1)*(x2-x1); }
// };
//
// int intersect(Rect p, Rect q){
//     int xOverlap = max(0,min(p.x2,q.x2)-max(p.x1,q.x1));
//     int yOverlap = max(0,min(p.y2,q.y2)-max(p.y1,q.y1));
//     return xOverlap*yOverlap;
// }
//}


int main() {
    //setIO("");
    int n; cin >>n;
    str in1;
    set<string> ex, notEx;
    for(int i=0; i < n;i++){
        cin >> in1;
        if(in1[0] == '!'){
            if(notEx.count(in1.substr(1))){
                cout << in1.substr(1);
                return 0;
            } 
            ex.insert(in1);
        } else {
            if(ex.count("!" + in1)){
                cout << in1;
                return 0;
            }
            notEx.insert(in1);
        }
    }
    cout <<"satisfiable";
    
}
    

#pragma GCC optimize("O2") //guess I shouldn't use this in an offline contest
 
#include <bits/stdc++.h> //this as well
using namespace std;
 
#define long long long
#define oo INT_MAX
#define OO LLONG_MAX
#define fi first
#define se second
#define el << "\n"
#define coutf(n) cout << setprecision(n) << fixed
#define mp make_pair
#define pf push_front
#define pb push_back
#define popf pop_front
#define popb pop_back
#define lb lower_bound
#define ub upper_bound
#define maxr *max_element
#define minr *min_element
#define swapr swap_ranges
#define nextp next_permutation
#define prevp prev_permutation
#define lcomp lexicographical_compare
#define pqueue priority_queue
#define uset unordered_set //c++11
#define umap unordered_map //c++11
 
using str = string;
using ii = pair<int, int>;
using ll = pair<long, long>;
using vi = vector<int>;
using vl = vector<long>;
using vs = vector<str>;
using vvi = vector<vi>;
using vii = vector<ii>;
 
#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define rev(i, n) for (int i = int(n - 1); i >= 0; --i)
#define fr(x, a) for (auto x : a) //c++11
#define sz(a) (int)(a).size()
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define gcd(a, b) abs(__gcd(a, b))
#define lcm(a, b) abs(a / gcd(a, b) * b)
#define max3(a, b, c) max(a, max(b, c))
#define min3(a, b, c) min(a, min(b, c))
 
long mod(long n) {return n >= 1000000007ll ? n % 1000000007ll : n;}
 
const int N = 2e5 + 5, M = 2e5 + 5;
const double pi = acos(-1);
 
void io(string name = "") {
    if (name.size()) {
        freopen((name + ".in").c_str(), "r", stdin);
        freopen((name + ".out").c_str(), "w", stdout);
    }
    else {
        #ifndef ONLINE_JUDGE
            freopen("i.in", "r", stdin);
            freopen("o.out", "w", stdout);
            freopen("e.out", "w", stderr);
        #endif
    } return;
}
void bruh() {
    map<str, int> a;
    int n; cin >> n;
    rep(i, n) {
        str s; cin >> s;
        a[s]++;
        if (s[0] == '!') { if (a[s.substr(1, s.length())]) { cout << s.substr(1, s.length()); return; } }
        else if (a["!" + s]) { cout << s; return; }
    }
    cout << "satisfiable";
}
int main() {
    ios_base::sync_with_stdio(true); cin.tie(nullptr);
    io();
    int t = 1;
    //cin >> t; //just need to comment this lol
    while (t--) {
        bruh();
        if (t) cout el; //case sensitive? no problem ;)
    }
    cerr << (double)clock() / CLOCKS_PER_SEC << " seconds bruh bruh lmao";
}