#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    int t,n;
    string b;
    cin >> t;
    while (t--)
    {
        cin >> n;
        cin >> b;
        string a="1";
        for (int i=1;i<n;i++)
        {
            if ((b[i-1]-'0')+(a[i-1]-'0')==(b[i]-'0')+1)
            {
                a+='0';
                continue;
            }
            a+='1';
        }
        cout << a << "\n";
    }
    return 0;
}
