#include <bits/stdc++.h>

using namespace std;

int main()
{
   int t;
   cin>>t;
   while(t--){
   int n;
   cin>>n;
   string s;
   cin>>s;
   string s1="";
s1+='1';
int t2=1;
   for(int i=1;i<n;i++){
       t2=s1[i-1]-'0'+s[i-1]-'0';
       if(t2==2 && s[i]=='1'){s1+='0';}
        if(t2==2 && s[i]=='0'){s1+='1';}
         if(t2==1 && s[i]=='1'){s1+='1';}
          if(t2==1 && s[i]=='0'){s1+='0';}
           if(t2==0 ){s1+='1';}
       
   }

        
        cout<<s1<<endl;
        
    }
    return 0;
}
