#include<bits/stdc++.h>
using namespace std; 
int power(long long int x,long long int y,long long int p)  
{  
    int res = 1;     
  
    x = x % p;
    if (x == 0) return 0;
  
    while (y > 0)  
    {  
        if (y & 1)  
            res = (res*x) % p;  
        y = y>>1;
        x = (x*x) % p;  
    }  
    return res;  
}  
int main(){
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t=1;
    //cin>>t;
    while(t--){
       int n;
       cin>>n;
       string s;
       set<string> st;
       string ans="satisfiable";
       for(int i=0;i<n;i++){
       	 cin>>s;
       	 reverse(s.begin(),s.end());
       	 string search,temp=s;
       	 if(s[s.size()-1]=='!'){
       	 	s.pop_back();
       	 	if(st.find(s)!=st.end()&&ans=="satisfiable"){
       	 	  	reverse(s.begin(),s.end());
       	 	  	ans=s;
			}
		 }
		 else{
		 	s+='!';
		 	if(st.find(s)!=st.end()&&ans=="satisfiable"){
       	 	  	reverse(temp.begin(),temp.end());
       	 	  	ans=temp;
       	 	  	reverse(temp.begin(),temp.end());
			}
		 }
		 st.insert(temp);
	   }
	   cout<<ans<<"\n";
    }
	return 0;
}

#include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<string>
#include<unordered_map>
#include <iomanip>
using namespace std;

#define intmax INT_MAX
#define lmax LONG_MAX
#define uintmax UINT_MAX
#define ulmax ULONG_MAX
#define llmax LLONG_MAX
#define ll long long
#define rep(i,a,N) for((i)=(a);(i)<(N);(i)++)
#define rrp(i,N,a) for((i)=(N)-1;(i)>=(a);(i)--)
#define llfor ll i,j,k
#define sc(a) cin>>a
#define pr(a) cout<<a<<endl
#define pY puts("YES")
#define pN puts("NO")
#define py puts("Yes")
#define pn puts("No")
#define pnn printf("\n")
#define sort(a) sort(a.begin(),a.end())
#define reverse(a) reverse(a.begin(),a.end())
#define push(a,b) (a).push_back(b)
#define llvec vector<vector<ll>>
#define charvec vector<vector<char>>
#define sizeoof(a,b) (a,vector<ll>(b))
#define llpvec vector<pair<ll,ll>>
/*繰り上げ除算*/ll cei(ll x,ll y){ll ans=x/y;if(x%y!=0)ans++;return ans;}
/*最大公約数*/ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}
/*最小公倍数*/ll lcm(ll x,ll y){return x/gcd(x,y)*y;}
/*n乗*/ll llpow(ll x,ll n){ll i,ans=1;rep(i,0,n)ans*=x;return ans;}
/*階乗*/ll fact(ll x){ll i,ans=1;rep(i,0,x)ans*=(x-i);return ans;}
/*nCr*/ll ncr(ll n,ll r){return fact(n)/fact(r)/fact(n-r);}
/*nPr*/ll npr(ll n,ll r){return fact(n)/fact(n-r);}
/*primejudge*/bool prime(ll a){if(a<=1)return false;ll i;for(i=2;i*i<=a;i++){if(a%i==0)return false;}return true;}
ll ans=0;llfor;///////////////////////////////////////////////////////////
int main(){
  ll N;
  cin>>N;
  ll ans=0;
  if(N>=1000) ans+=N-999;
  if(N>=1000000) ans+=N-999999;
  if(N>=1000000000) ans+=N-999999999;
  if(N>=1000000000000) ans+=N-999999999999;
  if(N>=1000000000000000) ans+=N-999999999999999;
  cout<<ans<<endl;
return 0;}
