
#include<iostream>

#define ll long long

  using namespace std;

int main()
{
  ll int j, t, i, n, k, ans;
  cin >> t;
  for(i=0;i<t;i++)
  {
    string s, t = "1";
    cin >> n;
    cin >> s;

    for(j=1;j<n;j++)
    {
      if('1' + s[j] != t[j-1] + s[j-1])
      t += "1";
      else
      t += "0";
    }

    cout << t << "\n";

  } 
    
    return 0;
}