#include <bits/stdc++.h>
using namespace std;
int main() {
  long long test, n;
  string str;
  scanf("%lld", &test);
  while (test--) {
    cin >> n;
    getchar();
    cin >> str;
    long long len = str.size();
    for (int i = 0; i < len; i = i + 2) cout << str[i];
    cout << endl;
  }
  return 0;
}
