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

void Solve() {
	int n;
	string b;
	cin >> n >> b;
	cout<<1;
	int pr=(int(b[0]-'0')+1);
	for(int i=1;i<n;i++) {
		int x=int(b[i]-'0');
		if(x+1!=pr) {
			cout<<1;
			pr=x+1;
		} else
		{
			cout<<0;
			pr=x;
		}
	}
	cout<<"\n";
}
 
int main() {
	ios::sync_with_stdio(false);
    cout.tie(nullptr);
    cin.tie(nullptr);
    int t;
    cin >> t;
    while(t--) {
    	Solve();
	}
}