#include <iostream>
#include <unordered_map>
using namespace std;
int main ()
{
    int n,is = 1;
    cin >> n;
    string *str = new string[n];
    unordered_map<string,int> map;
    for(int i = 0;i < n;i++)
    {
        cin >> str[i];
        if(str[i][0] == '!')
        {
            str[i].erase(str[i].begin());
            if(map.find(str[i]) != map.end()){is = 0;}
            else{str[i].insert(str[i].begin(),'!');}
        }
        else
        {
            str[i].insert(str[i].begin(),'!');
            if(map.find(str[i]) != map.end()){is = 0;}
            else{str[i].erase(str[i].begin());}
        }
        if(is == 0)
        {
            if(str[i][0] == '!')
            {
                str[i].erase(str[i].begin());
            }
            cout << str[i];
            break;
        }
        map[str[i]]++;
    }
    if(is){cout << "satisfiable";}
    return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
 int n;
  cin>>n;
  vector<string> v;
  map<string,int> m;
  for(int i=0;i<n;i++)
  { string s;
    cin>>s;
    if(s[0]=='!')
    {
      m[s]=1;
    }
   else
   {
     v.push_back(s);
   }
  }
  int n1=v.size();
  for(int i=0;i<n1;i++)
  { string s=v[i];
    string s1="!"+s;
    if(m[s1]==1)
    {
      cout<<s<<endl;
      return 0;
    }
  }
  cout<<"satisfiable"<<endl;
}











