#include <bits/stdc++.h>

using namespace std;

#define rep(i, n) for(int i = 0; i < n; i++)
#define reps(i, c, n) for(int i = c; i < n; i++)
#define inv(n, a) for(int i = 0; i < n; i++) cin >> a[i]
#define MOD 1000000007
#define INF 1e7
#define LINF 1e15
typedef long long ll;
typedef long double ld;
using Graph = vector<vector<int>>;
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
void print(){ cout << endl; }
template <class H, class... T> void print(H&& h, T&&... t){ cout << h << ", "; print(forward<T>(t)...); }
template <class C> void dump(C o){ rep(i, o.size()-1) cout << o[i] << ", "; cout << o.back() << endl; }

int main() {
	int n, x; cin >> n >> x;
	bool f = false;
	rep(i, n){
		int a; cin >> a;
		if (a != x){
			if (f)
				cout << " ";
			cout << a;
			f = true;
		}
	}
	cout << endl;
}

#include<bits/stdc++.h>
#define f(i,a,b) for(int i=a;i<=b;++i)
#define ff(i,a,b) for( int i=a;i>=b;--i)
#define debug(x) cerr << #x << " : " << x << " " << endl
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<string, string> pss;
const ll mod = 1e9 + 7;
const ll mod2 = 998244353;
const ll inf = 2e18;
const double tiaohe = 0.57721566490153286060651209;
inline ll in() { char ch = getchar();ll x = 0, f = 1;while (ch<'0' || ch>'9') { if (ch == '-')f = -1;ch = getchar(); }while (ch >= '0'&&ch <= '9') { x = x * 10 + ch - '0';ch = getchar(); }return x * f; }
const int N = 2e5 + 10;

int main()
{
#ifndef ONLINE_JUDGE
	freopen("in.txt", "r", stdin);
#endif	
	int n, x;cin >> n >> x;
	f(i, 1, n) {
		int now = in();
		if (now == x)continue;
		cout << now << " ";
	}
	return 0;
}