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