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