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