#include <bits/stdc++.h>
using namespace std;

int main( void ) {
    ios::sync_with_stdio( false );
    
    int n, k;
    cin >> n >> k;
    
    for( int i = 1; i <= n; i ++ ) {
        int x;
        cin >> x;
        
        if( x != k )
           cout << x << " ";
    }
    
    return 0;
}