#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y) {
  if (y == 0) return 1;
  long long temp = power(x, y / 2) % 1000000007;
  if (y % 2) {
    return (((temp * temp) % 1000000007) * x % 1000000007);
  }
  return (temp * temp) % 1000000007;
}
void solve() {
  long long n, i, j, k;
  cin >> n;
  string s;
  cin >> s;
  for (i = 0; i < 2 * n - 1; i += 2) cout << s[i];
  cout << "\n";
  return;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
