//g++ -std=gnu++14 a.cpp

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <tuple>
#include <iomanip>
#include <random>
#include <math.h>
#include <stdio.h>

using namespace std;

#define ll long long
#define rep(i, n) for(ll i = 0; i < (n); i++)
#define P pair<ll,ll>
ll MOD = 1e9 + 7;
int INF = 1 << 30;
ll INFL = 1LL << 60;
ll MODP = 998244353;
const ll M = 2000000;

ll lmax(ll x,ll y){
  if(x < y) return y;
  else return x;
}

ll lmin(ll x, ll y){
  if(x > y)return y;
  else return x;
}

ll gen(ll x,ll y){
  if(y == 0)return 1;
  if(y == 1)return x;
  if(y%2 == 1){
    return ((x%M)*gen(x,y-1)%M)%M;
  }else{
    ll res = gen(x,y/2)%M;
    return ((res%M)*(res%M))%M;
  }
}

ll gcd(ll x, ll y){
  if(x < y) swap(x,y);
  if(y == 0) return x;
  return gcd(y,x%y);
}

ll lcm(ll x,ll y){
  ll s = gcd(x,y);
  x /= s;
  y /= s;
  return x*y*s;
}

struct UnionFind{
  vector<ll> d;
  vector<P> m;
  UnionFind(int n) : d(n,-1),m(n,make_pair(-INFL,INFL)) {};
  int find(int x){
    if(d[x] < 0) return x;
    return d[x] = find(d[x]);
  }
  bool unite(int x,int y){
    x = find(x);
    y = find(y);
    if(x == y) return false;
    if(d[x] > d[y])swap(x,y); //yをxにくっつける
      d[x] += d[y];
      d[y] = x;
      m[y].first = lmax(m[x].first,m[y].first);
      m[y].second = lmin(m[x].second,m[y].second);

    return true;
  }
  bool same(int x,int y){
    return find(x)==find(y);
  }
  int size(int x){
    return -d[find(x)];
  }
};

int main(){
  ll n,x;
  cin >> n >> x;
  vector<ll> ans;
  rep(i,n){
    ll a;
    cin >> a;
    if(a != x)ans.push_back(a);
  }
  for(auto x : ans){
    cout << x << " ";
  }
  cout << endl;


  return 0;
}

#include <iostream>
#include <vector>
#include <string>

int main()
{
  int N;
  int64_t X;
  std::cin>>N>>X;
  
  std::vector<int64_t> A(N);
  for(auto &e:A)std::cin>>e;
  
  std::string result;
  result.reserve(11*N);
  for(auto e:A)if(e!=X)(result+=std::to_string(e))+=' ';
  if(result.empty()==false)result.pop_back();
  
  std::cout<<result<<std::endl;
  
  return 0;
}