#include <bits/stdc++.h>
using namespace std;
const int inf = (int)(1e9);
long long n, k, i, ans, j, tc;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  cin >> tc;
  while (tc--) {
    cin >> n;
    string s;
    cin >> s;
    for (i = 0; i < n; i++) cout << s[2 * i];
    cout << endl;
  }
}
