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