#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
#define ul unsigned long long int
#define vi vector<int>
#define vl vector<ul>
#define ff first
#define ss second
#define INF 1000000000

int main()
{
   int n;
   ll x;
   cin>>n>>x;

   vector<ll>v;
   for(int i=0;i<n;i++)
   {
       ll k;
       cin>>k;
       v.pb(k);
   }

   for(int i=0;i<v.size();i++)
   {
       if(v[i]==x)
         continue;
       else
        cout<<v[i]<<" ";
   }
   cout<<"\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main(){char c;string s;cin>>c>>s;cout<<s<<c;}