#include <bits/stdc++.h>
using namespace std;
const int INF = 1e6;
int a[INF];
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    string s;
    cin >> n >> s;
    for (int i = 0; i < 2 * n - 1; i += 2) cout << s[i];
    cout << endl;
  }
}
