#include <bits/stdc++.h>
#define int long long
using pii=std::pair<int,int>;
using namespace std;

int t, n;
int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cin >> t;
    for(int cases = 0; cases < t; cases++)
    {
        cin >> n;
        string s;
        for(int i = 0; i < 3; i++)
            cin >> s;
        for(int i = 0; i < n; i++)
            cout << "0";
        for(int i = 0; i < n; i++)
            cout << "1";
        cout << "0\n";
    }
    return 0;
}
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <tuple>
#include <math.h>
#include <set>
#include <stack>
#include <bitset>
#include <map>
#include <cassert>
#include <queue>
#include <cstring>
#include <random>
#include <unordered_set>
#include <unordered_map>
#define pqueue priority_queue
#define pb(x) push_back(x)
// #define endl '\n'
#define all(x) x.begin(), x.end()
//#define int long  long

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vector<int> > vvi;
// typedef tuple<ll, ll, ll> tiii;
typedef pair<int, int> pii;
typedef vector<pair<int, int> > vpii;
typedef vector<bool> vb;
typedef vector<string> vs;
typedef vector<char> vc;

const int inf = 1e9 + 228;
const ll mod = 1e9 + 7;
const ll mod2 = 998244353;
const ld eps = 1e-14;


void fast_io(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
//    freopen("stones.in", "r", stdin);
//    freopen("stones.out", "w", stdout);
}


void solve(){
    int n, x;
    cin >> n >> x;
    for(int i=0; i<n; i++){
        int a;
        cin >> a;
        if(a != x)
            cout << a << " ";
    }
}

signed main(){
     fast_io();
//  srand(time(NULL));
    cout << fixed << setprecision(10);
    int q = 1;
//    cin >> q;
    while(q--)
        solve();
}

