/*
BY: shalekberli
LANG: C++
*/
#include <bits/stdc++.h>
//MACROS//
#define FREEELO ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define endl '\n'
#define pb push_back
#define mp make_pair
#define INF 0x3F3F3F3F
#define sz(x) (int)x.size()
#define all(v) v.begin(), v.end()
#define F first
#define S second
#define MAX 10000000
#define mod 1000000007
#define MOD 998244353
#define ll long long
#define lld long double
#define pll pair<long long>
#define pii pair<int, int>
#define loop1(i, n) for (ll i = 1; i <= (n); i++)
#define loop0(i, n) for (ll i = 0; i < (n); i++)
#define loop(i, k, n) for(ll i = (k);i <= (n);i++)
#define loopr(i, k, n) for(ll i = (k);i >= (n);i--)
using namespace std;
int T;
int main()
{
    FREEELO
    cin >> T;
    while(T--)
    {
        int n; cin >> n;
        vector<int> a(n + 1);
        string s, ans = ""; cin >> s;
        loop0(i, n)
            a[i + 1] = (s[i] - '0');
        a[1] += 1;
        ans += '1';
        loop(i, 2, n)
        {
            if(a[i] + 1 != a[i - 1])
            {
                a[i] += 1;
                ans += '1';
            }
            else ans += '0';
        }
        cout << ans << endl;
    }
    return 0;
}