#include <bits/stdc++.h>
using namespace std;
int main(int args, char** argv) {
  int N = 0, tc;
  string str;
  cin >> tc;
  while (tc-- > 0) {
    cin >> N;
    cin >> str;
    N += N - 1;
    for (int i = 0; i < N; i += 2) {
      cout << str[i];
    }
    cout << endl;
  }
  return 0;
}
