#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define irep(i, n) for (int i = (n); i >= 0; i--)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1 << 25;
const int MOD = 1e9+7;
 
int main() {
  int n, x;
  cin >> n >> x;
  vector<int> a(n);

  rep(i,n) {
    int a;
    cin >> a;
    if (a != x) cout << a << " ";
  } 
  cout << endl;
  return 0;
}
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
  ll size,ele;
  ll c;
  cin>>size>>ele;
  vector<ll>v;
  for(int i=0;i<size;i++)
  {
    
    cin>>c;
    v.push_back(c);
  }
  for(int i=0;i<size;i++)
  {
    if(v[i]!=ele)
      cout<<v[i]<<" ";
     
  }
  return 0;
}