#include<bits/stdc++.h>
using namespace std;
int main(){
	int t;
	cin >> t;
	while(t--){
		int n, temp;
		string s;
		cin >> n >> s;
		printf("1");
		if(s[0] == '1') temp = 2;
		else temp = 1;
		for(int i = 1; i < n; i++){
			if(s[i] == '0'){
				if(temp == 1) printf("0"), temp = 0;
				else printf("1"), temp = 1;
			}
			else if(s[i] == '1'){
				if(temp == 2) printf("0"), temp = 1;
				else printf("1"), temp = 2;
			}
		}
		printf("\n");
	}
	return 0;
}