#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const long long MOD = pow(10,9)+7;

void SieveOfEratosthenes(int n) 
{ 
    bool prime[n+1]; 
    memset(prime, true, sizeof(prime)); 
  
    for (int p=2; p*p<=n; p++) 
    {
        if (prime[p] == true) 
        { 
            for (int i=p*p; i<=n; i += p) 
                prime[i] = false; 
        } 
    } 
  
    
    for (int p=2; p<=n; p++) 
       if (prime[p]) ;
        //   do something
} 

int solve(){
    ll n;
    cin>>n;
    ll prev=-1;
    char a;
    cin>>a;
    cout<<"1";
    ll psum= 1+( a-48);
    for(ll i=1;i<n;i++){
        cin>>a;
        ll z = a-48;
        if(z+1==psum){
            cout<<"0";
            psum=z+0;
        }else{
            cout<<"1";
            psum=z+1;
        }
    }
    cout<<"\n";
    return 0;
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    ll test=2;

    switch(test){
        case 1:solve(); break;
        case 2:{
            ll t;
            cin>>t;
            while(t--){
                solve();
            }
        };
        break;
    }

}