/******************************************
* AUTHOR : RTG *
******************************************/
#include <bits/stdc++.h>
using namespace std;

int main() {

	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	#ifndef ONLINE_JUDGE 
    // For getting input from input.txt file 
    FILE *input = freopen("/home/tharun/Documents/cpg/input.txt", "r", stdin); 
    // Printing the Output to output.txt file 
    FILE *output = freopen("/home/tharun/Documents/cpg/output.txt", "w", stdout); 
    int start_time = (int)clock();
    #endif 

    int n,x;
    cin>>n>>x;
    for(int i=0;i<n;i++){
    	int tmp;
    	cin>>tmp;
    	if(tmp==x);
    	else
    	cout<<tmp<<" ";
    }    

    #ifndef ONLINE_JUDGE 
    // Time taken for execution
    cout<<"\nTime = "<<clock() - start_time<<"ms";
    #endif 
    
	return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,x,a;
  cin >> n >> x;
  while(cin >> a){
    if(a != x) cout << a << ' ';
  }
}