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