#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define me(a,x) memset(a,x,sizeof(a))
#define sf scanf
#define pf printf
#define rep(i,x,y) for(int i=x;i<=y;i++)
#define per(i,x,y) for(int i=x;i>=y;i--)
#define gcd __gcd
#define pb push_back
#define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
const int mod=1e9+7;
const int INF=0x3f3f3f3f;
const int maxn=1e5+10;
const double pi=acos(-1.0);
using namespace std;
char s[maxn],a[maxn];
int he[maxn];
int n;
void solve()
{
	sf("%d",&n);
	getchar();
	sf("%s",s);
	rep(i,0,n-1){
		if(i==0){
			a[i]='1';
		}else{
			he[i-1]=s[i-1]-'0'+a[i-1]-'0';
			if(s[i]==he[i-1]+'0'){
				a[i]='1';
			}else if(s[i]+1==he[i-1]+'0'){
				a[i]='0';
			}else{
				a[i]='1';
			}
		}
	}
	pf("%s\n",a);
}

int main()
{
//	IOS;
	int t;
	cin>>t;
	while(t--){
		solve();
	}
	return 0;
}