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