#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int ii = 0; ii < t; ++ii) {
    int n;
    cin >> n;
    vector<int> s(2 * n - 1);
    char c;
    for (int i = 0; i < 2 * n - 1; ++i) {
      cin >> c;
      s[i] = c - '0';
    }
    vector<int> ans(n);
    for (int i = 0; i < n; ++i) {
      ans[i] = s[2 * i];
    }
    for (int i = 0; i < n; ++i) cout << ans[i];
    cout << "\n";
  }
  return 0;
}
