#include<iostream>
#include<algorithm>
#include<string>
#include<cstring>
#include<cstdio>
#include<stdio.h>
#include<cmath>
#include<math.h>
#include<vector>
#include<set>
#include<queue>
#include<map>
#include<sstream>
#include<iomanip>
#define forn(i,n) for(int (i)=0;i<(n);i++)
#define pb push_back
#define mp make_pair
using namespace std;
typedef pair<int,int>pii;
typedef long long ll;
typedef pair<ll,ll> pll;
const int MAXN=100005;
const int INF=2147483647;
const ll LINF=9223372036854775807;
const int dx[]={1,-1,0,0},dy[]={0,0,1,-1};
int n,ans;
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cin>>n;
	while(n--)
	{
		int x;
		cin>>x;
		ans+=max(0,x-10);
	}
	cout<<ans;
	return 0;
}

#include <iostream>

using namespace std;

void solve() {
  int n;
  string s1,s2,s3;
  cin >> n >> s1 >> s2 >> s3;
  cout << string(n,'0') << string(n,'1') << '0' << endl;
}

int main() {
  int t;
  cin >> t;
  for (int _=0; _<t; _++) solve();
  return 0;
}