#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int inf = INT_MAX;

int main() {
	int n, x; cin >> n >> x;
	vector<int> ans; rep(i, n) {
		int a; cin >> a; if (a == x)continue;
		ans.push_back(a);
	}for (int i : ans)cout << i << ' '; cout << endl;
}
#include <iostream>
#include <vector>
#include <algorithm>
#include <unordered_set>
#include <cstdlib>
#include <cmath>
#define ll long long
using namespace std;

int main(){
	ll i,j,n,x,a,flag=0;
	cin >> n >> x;
	
	for (i = 0; i < n; i++) {
		cin >> a;
		if (a != x) {
			if (flag == 1) {
				cout << " ";
			}
			cout << a;
			flag = 1;
		}
	}
	cout << endl;
	
	return 0;
}


