#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long int T;
  cin >> T;
  while (T--) {
    long long int n;
    cin >> n;
    ;
    string a;
    cin >> a;
    for (long long int i = 0; i < (n * 2) - 1; i += 2) cout << a[i];
    cout << "\n";
  }
  return 0;
}
