#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int64_t t;
  cin >> t;
  while (t--) {
    int64_t n;
    cin >> n;
    string s;
    cin >> s;
    string ans = "";
    for (int64_t i = 0; i < s.size(); i += 2) {
      ans += s[i];
    }
    cout << ans << "\n";
  }
}
