#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
#include <functional>
#include <chrono>

#define int long long
#define ld long double
#define db double
#define endl "\n"
#define pb push_back
#define mp make_pair
#define all(x) x.begin(), x.end()

using namespace __gnu_pbds; 
using namespace std;
using namespace chrono;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
template<typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

void deb_out() { 
    cout << endl; 
}
template <typename Head, typename... Tail>
void deb_out(Head H, Tail... T) {
    cout << " " << H;
    deb_out(T...);
}
#ifdef LOCAL
    #define deb(...) cout << "[" << #__VA_ARGS__ << "]:", deb_out(__VA_ARGS__);
#else
    #define deb(...) ;
#endif

const long double PI = 3.14159265358979323846264338;
const long long INF = 1000000000000000000;
const long long INF1 = 1000000000;
const long long MOD = 1000000007;
// const long long MOD = 998244353;

inline int cl(int a, int b){
    if(a % b)
        return 1 + a / b;
    return a / b;
}

int32_t main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int Tests = 1;
    // cin >> Tests;
    while (Tests--) {
        int n, x;
        cin >> n >> x;
        while (n--) {
            int X;
            cin >> X;
            if (X != x) {
                cout << X << " ";
            }
        }
    }
}

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

int main() {
  int a,b;
  cin >> a >> b;
  int array[a];
  for(int i = 0;i < a;i++){
    cin >> array[i];
  }
  for(int i = 0;i < a;i++){
    if(array[i] == b) continue;
    else cout << array[i] << " " ;
  }
}
