#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  ;
  int t, n;
  string s, p;
  cin >> t;
  while (t--) {
    cin >> n;
    cin >> s;
    for (int j = 0; j < (2 * n - 1); j += 2) {
      cout << s[j];
    }
    cout << "\n";
  }
}
