#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = 0;
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
inline int max(const int &x, const int &y) { return x > y ? x : y; }
const int mod = 10000;
const int maxn = 1e5 + 100;
int T, m, n;
char s[maxn];
char ans[maxn];
int main() {
  T = read();
  while (T--) {
    n = read();
    scanf("%s", s);
    for (int i = 0; i < n; i++) {
      ans[i] = s[i * 2];
    }
    ans[n] = 0;
    cout << ans << endl;
  }
  return 0;
}
