#include <iostream>
#include <string>

using namespace std;

typedef unsigned long long int ull;

int main()
{
    short t;
    cin>>t;

    while(t--)
    {
        ull n;
        cin>>n;

        string b,a="";
        cin>>b;

        a = a+"1";

        for(int i=1;i<n;i++)
        {
            if(b[i]=='0')
            {
                if(b[i-1]=='0')
                {
                    if(a[i-1]=='0')
                        a=a+"1";
                    else
                        a=a+"0";
                }
                else
                {
                    if(a[i-1]=='0')
                        a=a+"0";
                    else
                        a=a+"1";
                }
            }
            else if(b[i]=='1')
            {
                if(b[i-1]=='1')
                {
                    if(a[i-1]=='1')
                        a=a+"0";
                    else
                        a=a+"1";
                }
                else
                {
                        a=a+"1";
                }
            }
        }

        cout<<a<<endl;
    }

    return 0;
}
