#define IOS ios::sync_with_stdio(false);
#define rep(i, a, n) for(ll i=a;i<=n;i++)

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
#define endl "\n"
const int INF = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const int N = 1e6 + 10;
ll n, m, t, k, ans, cnt, sum, flag;
ll arr[N], vis[N];
char s[N], c;

int main() {
    IOS;
    cin >> n >> m;
    rep(i, 1, n) cin >> arr[i];
    rep(i, 1, n) if (arr[i] != m) cout << arr[i] << " ";
    cout<<endl;
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define F first
#define S second

signed main(){
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	int n;
	cin >> n;
	//string s[n];
	set <string> s;
	map <string,bool> m1,m2;
	string ans = "satisfiable";
	string a;
	for(int i=0; i<n; i++){
		cin >> a;
		if(a[0]=='!'){
			a = a.substr(1);
			m2[a]=1;
		}
		else{
			m1[a]=1;
		}
		s.insert(a);
	}

	auto it = s.begin();
	while(it!=s.end()){
		if(m1[*it] && m2[*it]){
			ans = *it;
			break;
		}
		it++;
	}

	cout << ans;


	
	

	return 0;
}