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