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

int main(){
	ll t;
	cin>>t;
	while(t--){
		ll l;
		cin>>l;
		string b;
		cin>>b;
		ll pre=-1;
		string s=b;
		for(ll i=0;i<l;i++){
			if((b[i]-'0'+1)!=pre){
				pre=(b[i]-'0'+1);
				s[i]='1';
			}
			else{
				pre=(b[i]-'0');
				s[i]='0';
			}		
		}
		cout<<s<<endl;
	}
	return 0;
}

