#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
#define eb emplace_back
using namespace std;
template <class T = int>
using V = vector<T>;
template <class T = int>
using VV = V<V<T>>;
using ll = long long;
using ld = long double;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using pdd = pair<ld,ld>;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n, x;
    cin >> n >> x;
    rep(i,n){
        int a;
        cin >> a;
        if(a != x) cout << a << ' ';
    }
}
#include <bits/stdc++.h>
using namespace std;

const int MAXN = 1e5+10;
int sz[MAXN];

int main() {
	int n, x;
	cin >> n >> x;
	for(int i=0; i<n; i++) {
		cin >> sz[i];
	}
	for(int i=0; i<n; i++) {
		if(sz[i]!=x){
			cout << sz[i] << " ";
		}
	}
	cout << endl;
	return 0;
}