#include <iostream>
#include <iomanip>
#include <limits>
#include <cmath>
#include <vector>
typedef long long ll;

using namespace std;
int main() {
	int n;
	cin >> n;
	ll x;
	cin >> x;
	vector<ll> v;
	for(int i = 0;i < n;i++){
		ll a;
		cin >> a;
		if(a == x){
			continue;
		}
		else{
			v.push_back(a);
		}
	}
	for(int i = 0;i < v.size();i++){
		cout << v[i] << " ";
	}
	cout << endl;
	return 0;
}
#include <iostream>
#include <string>
#include <vector>
#include <deque>
#include <algorithm>
#include <math.h>
#include <iomanip>
#include <sstream>
#define INF 100000000
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using p = pair<int, int>;


int main() {
    
    int n, x;
    vector<int> ans;
    cin >> n >> x;
    rep(i,n){
        int a;
        cin >> a;
        if(a != x) ans.push_back(a);
    }
    rep(i,ans.size()) cout << ans[i] << " ";
    return 0;
}