//CF: aayuprasad

#include "bits/stdc++.h"
using namespace std;

#define     prec(n)         fixed<<setprecision(n)
#define     int             long long int
#define     fast()          ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define     all(x)          begin(x),end(x)
#define     rz(x)           resize(x)
#define     asn(x,y)        assign(x,y)
#define     mem(a,b)        memset(a,b,sizeof(a))
#define     sz(x)           ((int)size(x))
#define     eb              emplace_back
#define     pb              push_back
#define     pf              push_front
#define     pob             pop_back
#define     pof             pop_front
#define     ins             insert
#define     vi              vector<int>
#define     pii             pair<int,int>
#define     mii             map<int,int>
#define     F               first
#define     S               second
#define     remax(a,b)      a=max(a,b)
#define     remin(a,b)      a=min(a,b)
#define     bitcount(x)     __builtin_popcountll(x)
#define     iceil(n,x)      (((n)-1)/(x)+1)
#define     db1(x)          cout<<#x<<"="<<x<<'\n'
#define     db2(x,y)        cout<<#x<<"="<<x<<","<<#y<<"="<<y<<'\n'
#define     db3(x,y,z)      cout<<#x<<"="<<x<<","<<#y<<"="<<y<<","<<#z<<"="<<z<<'\n'
#define     fo(i,n)         for(int i=0;i<(n);++i)
#define     dbvec(a)      cout<<#a<<": "; for(auto i:a) cout<<i<<" "; cout<<"\n"
#define     dbpairvec(a)  cout<<#a<<": \n"; for(auto i:a) cout<<i.F<<" "<<i.S<<"\n"
#define     readvec(a,n)    fo(i,n){int x;cin>>x;a.pb(x);}

using ull=unsigned long long;
using ll=long long;
using ld=long double;

const ld pi=acos(-1);
const ll inf=1e18,M=1e9+7;
const int N=1;
const string alphabet="abcdefghijklmnopqrstuvwxyz";

int32_t main(){
    fast();
    ll tt = 1;
    cin >> tt;
    while(tt--){
        int n;
        cin >> n;
        string b;
        cin >> b;
        string a;
        a += '1';
        int prev = (b[0]=='1')?2:1;
        for(int i = 1; i < n; i++) {
            //db2(prev,b[i]);
            if(1+b[i]-'0' != prev) {
                a += '1';
                prev = 1+b[i]-'0';
            }
            else {
                a += '0';
                prev = b[i]-'0';
            }
        }
        cout << a << '\n';
    }
    return 0;
}
