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