#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL)
#define endl '\n'
#define mod 1000000007
#define inf 1e18
#define int long long
#define fr(i,a,b) for( int i=a;i<b;i++)
typedef vector<int> vi;typedef vector<vi> vvi;
typedef pair<int,int> pi;typedef vector<pi> vpi;
#define sz(x) (int)(x).size()
#define all(v)  (v).begin(), (v).end()
#define ar array
#define pb push_back
void ingraph(vi graph[], int m){int x, y;fr(i,0,m){cin>>x>>y;x--, y--;graph[x].pb(y);graph[y].pb(x);}}

int32_t main()
{
  fast;
  int n;
  cin>>n;
  string s[n];
  map<string,bool>mp;
  fr(i,0,n)
  {
  	cin>>s[i];
  	if(s[i][0]=='!')
  	{
  		mp[s[i].substr(1,sz(s[i])-1)]=true;
  	}
  }
  string ans="";
  fr(i,0,n)
  {
  	if(s[i][0]!='!')
  	{
  		if(mp[s[i]])
  		{
  			ans=s[i];
  			break;
  		}
  	}
  }
  if(sz(ans)!=0)
  {
  	cout<<ans<<"\n";
  }
  else cout<<"satisfiable\n";
  //cerr << "Time elapsed: " << clock() / (double)CLOCKS_PER_SEC << endl;
  return 0;
}
#include <iostream>
#include <map>
#include <unordered_map>
#include <string>

int main() {
  size_t n_string;
  std::cin >> n_string;

  std::unordered_map<std::string, bool> map;
  std::string s;
  for (size_t i = 0; i < n_string; i++) {
    std::cin >> s;
    bool if_exclamation;
    if (s[0] == '!') {
      s = s.substr(1);
      if_exclamation = true;
    } else {
      if_exclamation = false;
    }

    auto find = map.find(s);
    if (find != map.end()) {
      if (if_exclamation != find->second) {
        std::cout << s << std::endl;
        return 0;
      }
    } else {
      map[s] = if_exclamation;
    }
  }
  std::cout << "satisfiable" << std::endl;
}
