/**
  * @file    :vsDebugger.cpp
  * @brief   :Round 696
  * @date    :2021-04-26
  * @Motto   :Love Sakurai Yamauchi Forever
  */
#include <iostream>
#include <cstdio>
#include <cstring>
#include <queue>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <unordered_map>
#include <deque>
#include <cmath>
#include <algorithm>
#define mem(a) memset(a, 0, sizeof(a))
#define IOS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
//#define int long long
const int inf = 0x3f3f3f3f;
typedef long long ll;
using namespace std;

int main()
{
//	IOS;
	int t;
	cin >> t;
	while(t--){
		int n;
		cin >> n;
		string s;
		cin >> s;
		cout << 1;
		char last = s[0] + 1;
		for(int i = 1; i < s.size(); ++i){
			if(last == '1' && s[i] == '1'){
				cout << 1;
				last = '2';
			}
			else if(last == '1' && s[i] == '0'){
				cout << 0;
				last = '0';
			}
			else if(last == '2' && s[i] == '1'){
				cout << 0;
				last = '1';
			}
			else if(last == '2' && s[i] == '0'){
				cout << 1;
				last = '1';
			}
			else if(last == '0' && s[i] == '1'){
				cout << 1;
				last = '2';
			}
			else if(last == '0' && s[i] == '0'){
				cout << 1;
				last = '1';
			}
		}
		cout << endl;
	}
	return 0;
}