#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, i, n, var;
  cin >> t;
  while (t--) {
    cin >> n;
    string s;
    cin >> s;
    var = (((2 * n) - 1) / n) + 1;
    for (i = 0; i < (2 * n - 1); i += var) {
      cout << s[i];
    }
    cout << endl;
  }
}
