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