#include <iostream>
#include <vector>
#include <unordered_set>
#include <string>
#include <algorithm>
#include <cstdio>

using namespace std;

int main(void) {
    int t, n;
    string s1, s2, s3;
    cout << fixed;

    cin >> t;
    for (int i = 0; i < t; i++) {
        cin >> n;
        cin >> s1 >> s2 >> s3;

    	cout << 1;
    	for (int j = 0; j < n; j++) {
    		cout << 0;
            }
    	for (int j = 0; j < n; j++) {
    		cout << 1;
            }
        cout << endl;
    }

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
long long n,m,mx=-1e9,a[1000010],i,j,k,l=-1,s,t,p;
int main(){
	cin>>n>>m;
	for(i=1;i<=n;i++){
		cin>>s>>t>>p;
		a[s+1]+=p;
		a[t+1]=a[t+1]-p;
		l=max(l,t);
	}
	for(i=1;i<=l;i++){
		a[i]+=a[i-1];
		mx=max(a[i],mx);
	}
	if(mx>m) cout<<"No";
	else cout<<"Yes";
	return 0;
}