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