#include <iostream>
#include <fstream>
#include <math.h>
#include <algorithm>
#include <string>
#include <map>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <tuple>
#include <stdlib.h>
#include <stdio.h>
#include <set>
#include <limits>
#include <iomanip>
#include <cstring> //memset
using namespace std;

#define ll long long
#define imi INT_MIN
#define ima INT_MAX
#define llmi LLONG_MIN
#define llma LLONG_MAX
#define dmi (double)llmi
#define dma (double)llma
#define forn(i,a,b) for(ll i = a; i < b; i++)
#define forn2(i,a,b) for(ll i = a; i >= b; i--) 
#define fork(i,a,b,k) for(ll i = a; i <= b; i+=k)
#define fork2(i,a,b,k) for(ll i = a; i>=b; i-=k)
#define vl vector<ll>
#define eb emplace_back
#define ef emplace_front
#define ppf pop_front
#define ppb pop_back
#define gt greater<int>()
#define w(t) while(t--)

const int nmax = 2e5+1;
const int mod = 1e9+7;
const double eps = 1e-9;

bool checkPR(ll n) {
    ll tmp = sqrt(n);
    if(n == 2 || n == 3) return 1;
    if(n <= 1 || n == 4) return 0;
    if(n%2 == 0 || n%3 == 0) return 0;
    fork(i,5,tmp,6) {
        if(n%i == 0 || n%(i+2) == 0) return 0;
    }
    return 1;
}

bool checkSQ(ll n) {
    ll tmp = trunc(sqrt(n));
    return tmp*tmp == n;
}

int gcd(ll a, ll b) {
    if(b == 0) return a;
    return gcd(b, a%b);
}
int sumD(ll n) {
    int ans = 0;
    while(n) {
        ans += n%10;
        n /= 10;
    }
    return ans;
}

int cntD(ll n) {
    int ans = 0;
    while(n) {
        ans++;
        n/=10;
    }
    return ans;
}
void setP(int n) {
    cout << setprecision(n) << fixed;
}
bool pr[(int)1e6]; 
void eratos(ll n) {
    forn(i,2,sqrt(n)) {
        if(!pr[i]) fork(j, i*i, n, i) pr[j] = 1;
    }
}

int cntDiv(ll n) {
    int ans = 0;
    forn(i,1,trunc(sqrt(n))+1) {
        if(n%i == 0) ans += 2;
    }
    if(checkSQ(n)) ans--;
    return ans;
}

ll fastMul(ll base, ll p) {
    if(p == 1) return base;
    ll tmp = fastMul(base, p/2) % mod;
    ll res = (tmp*tmp) % mod;
    if(p&1) res = (res*base) % mod;
    return res;
}
double fastMul(double base, ll p) {
    if(p == 1) return base;
    double tmp = fastMul(base, p/2);
    double res = tmp*tmp;
    if(p&1) res *= base;
    return res;
}

ll iMod(ll n) {
    return fastMul(n, mod-2);
}

struct key {
    ll v, pos;
};
struct itv {
    ll b, e, pos;
};

bool ss1(key p, key q) {
    return p.v < q.v;
}

int main() {
    ios::sync_with_stdio(0); cin.tie(0);
    double m,n,x,y,z,t,l;
    string s,s1,s2;
    cin >> n >> x;
    vl v;
    forn(i,0,n) {
        cin >> y;
        if(x != y) v.eb(y);
    }
    for(auto i: v) cout << i << " ";
}
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;

using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define all(v) v.begin(), v.end()

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    int n,x;
    cin >> n >> x;
    vector<int> a(n);
    rep(i,n) cin >> a[i];

    rep(i,n){
        if(a[i]!=x)cout << a[i] << endl;
    }

}