#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    string s;
    cin >> s;
    int one = 0, zero = 0;
    for (int i = 0; i < (2 * n) - 1; i++) {
      one += (s[i] == '1');
      zero += (s[i] == '0');
    }
    if (one < zero) {
      for (int i = 0; i < n; i++) cout << '0';
    } else {
      for (int i = 0; i < n; i++) cout << '1';
    }
    cout << endl;
  }
  return 0;
}
