#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    string s, res = "";
    int n;
    cin >> n;
    cin >> s;
    int cnt = 0;
    for (int i = 0, j = n - 1; j < s.length(); i++, j++) {
      res += s[i + cnt];
      cnt++;
    }
    cout << res << "\n";
  }
  return 0;
}
