
/*
   starting with the name of ALLAH
   Author - Marajul islam
*/ 
#include<bits/stdc++.h>
using namespace std;
 
 
 
int sc1() {int x; scanf("%d", &x); return x;}
long long sc2() {long long x; scanf("%lld", &x); return x;}
 
const int mod= 1e9 + 7;
inline int add(int a, int b) {a += b; return a >= mod ? a - mod : a;}
inline int sub(int a, int b) {a -= b; return a < 0 ? a + mod : a;}
inline int mul(int a, int b) {return (long long)a * b % mod;}
 
#define F               first
#define S               second 
#define mp              make_pair
#define pb              push_back
#define pf              push_front
#define speed_up        ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define sz(x)           (int)x.size()
#define all(x)          x.begin(), x.end()
#define debug           cerr << "OK\n";
#define ub              upper_bound
#define lb              lower_bound
#define gcd(a,b)        __gcd(a,b)
#define lcm(a,b)        (a*b)/gcd(a,b)
#define Int             sc1()
#define LL              sc2()
#define For(n)          for(int i=0;i<n;i++)
#define Forj(n)         for(int j=0;j<n;j++)
#define Fork(n)         for(int k=0;k<n;k++)
#define For1(n)         for(int i=1;i<=n;i++)
 
typedef long long       ll;
typedef vector<int>     vi;
typedef vector<ll>      vll;
typedef pair<int, int>  pii;
typedef pair<ll, ll>    pll;
typedef vector<pii>     vpii;
typedef set <int>       si;
typedef set <ll>        sll;
typedef multiset <int>  msi;
typedef multiset <ll>   msll;
typedef map <int, int>  mi;
typedef map <ll, ll>    mll;
 
#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it) {cout << endl;}
template<typename T, typename... Args> void err(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << " = " << a << ", ";
    err(++it, args...);
}
  
const int inf           = (int)2e9 + 5;
const ll  Inf           = (ll)1e18 + 5;
const int N             = 5e6 + 5;
 
 
 
int solve() {
 	

 	int n;
 	cin>>n;
 	string s;
 	cin>>s;
 	string ans=s;
 	char ch = 'w';
 	for(int i=0;i<sz(s);i++){
 		if(s[i]=='1'){
 			if(ch!='2') ans[i] = '1',ch ='2';
 			else ans[i] = '0',ch = '1';
 		}
 		else if(s[i]=='0'){
 			if(ch!='1') ans[i]  = '1',ch ='1';
 			else ans[i]  ='0',ch = '0';
 		}

 	}

 	cout<<ans<<endl;
	return 0;
}
 
 
 
 
int main()
{
	//speed_up;
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
 
	int test = 1, tc = 0;
	scanf("%d", &test);
	//cin >> test;
	while (test--) {
		//printf("Case %d: ", ++tc);
		solve();
	}
 
	return 0;
 
}
 

