#include <bits/stdc++.h>

#define pb push_back
#define fst first
#define snd second
#define INF 0x7fffffff
#define INFLL 0x7FFFFFFFFFFFFFFF
#define lenA(ar) sizeof(ar)/sizeof(*ar)
#define fill(a,c) memset(&a, c, sizeof(a))
#define fore(i,x,y) for(int i=x;i<y;i++)
#define foreI(i,x,y) for(int i=x-1;i>=y;i--)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define FIN ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define sl "\n";
#define ii pair<ll,ll>
#define mk make_pair


typedef long long ll;
typedef unsigned long long ull;

using namespace std;



int main(){
   ll n,x;cin>>n>>x;
   fore(i,0,n){
       ll a;cin>>a;
       if(a!=x)cout<<a<<" ";
    }
    cout<<"\n";

}




#include <iostream>
#include <vector>

using namespace std;

int main()
{
	int N;
	long long X;
	cin >> N >> X;

	vector<long long> v;
	for (int i = 0; i < N; i++) {
		long long tmp;
		cin >> tmp;
		if (tmp != X) {
			v.push_back(tmp);
		}
	}

	for (long long ans : v) {
		cout << ans << " ";
	}
	cout << endl;

	return 0;
}
