#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7, inf = 1e9 + 7;
const long long infll = 1e18 + 7;
bool google_contest = false;
long long myadd(long long a, long long b) {
  long long ans = a + b;
  ans -= ans >= mod ? mod : 0;
  return ans;
}
long long mysub(long long a, long long b) { return (a - b + mod) % mod; }
long long mymul(long long a, long long b) { return (a * b) % mod; }
long long mypow(long long a, long long b) {
  long long ans = 1;
  while (b > 0)
    if (b & 1)
      ans = mymul(ans, a), b--;
    else
      a = mymul(a, a), b >>= 1;
  return ans;
}
long long nCr(long long n, long long r) {
  if (r == 0) return 1;
  if (r == 1) return n;
  if (n == 0) return 0;
  return mymul(n, mymul(nCr(n - 1, r - 1), mypow(r, mod - 2)));
}
const int dx[4] = {1, -1, 0, 0};
const int dy[4] = {0, 0, 1, -1};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t, tt;
  t = 1;
  cin >> t;
  if (google_contest) tt = 1;
  while (t--) {
    int n;
    cin >> n;
    string s;
    cin >> s;
    int j = 0;
    string ans;
    for (int i = 0; i < n; i++) {
      ans.push_back(s[j]);
      j += 2;
    }
    cout << ans << '\n';
    if (google_contest) {
      cout << "Case " << tt++ << ": ";
    }
  }
  return 0;
}
