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