#include <bits/stdc++.h>
using namespace std;
char s[105];
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d", &n);
    scanf("%s", s + 1);
    for (int i = 1; i <= 2 * n - 1; i += 2) printf("%c", s[i]);
    printf("\n");
  }
}
