A binary string is a string where each character is either 0 or 1. Two binary strings a and b of equal length are similar, if they have the same character in some position (there exists an integer i such that a_i = b_i). For example:

  * 10010 and 01111 are similar (they have the same character in position 4); 
  * 10010 and 11111 are similar; 
  * 111 and 111 are similar; 
  * 0110 and 1001 are not similar. 



You are given an integer n and a binary string s consisting of 2n-1 characters. Let's denote s[l..r] as the contiguous substring of s starting with l-th character and ending with r-th character (in other words, s[l..r] = s_l s_{l + 1} s_{l + 2} ... s_r).

You have to construct a binary string w of length n which is similar to all of the following strings: s[1..n], s[2..n+1], s[3..n+2], ..., s[n..2n-1].

Input

The first line contains a single integer t (1 ≤ t ≤ 1000) — the number of test cases.

The first line of each test case contains a single integer n (1 ≤ n ≤ 50).

The second line of each test case contains the binary string s of length 2n - 1. Each character s_i is either 0 or 1.

Output

For each test case, print the corresponding binary string w of length n. If there are multiple such strings — print any of them. It can be shown that at least one string w meeting the constraints always exists.

Example

Input


4
1
1
3
00000
4
1110000
2
101


Output


1
000
1010
00

Note

The explanation of the sample case (equal characters in equal positions are bold):

The first test case: 

  * 1 is similar to s[1..1] = 1. 



The second test case: 

  * 000 is similar to s[1..3] = 000; 
  * 000 is similar to s[2..4] = 000; 
  * 000 is similar to s[3..5] = 000. 



The third test case: 

  * 1010 is similar to s[1..4] = 1110; 
  * 1010 is similar to s[2..5] = 1100; 
  * 1010 is similar to s[3..6] = 1000; 
  * 1010 is similar to s[4..7] = 0000. 



The fourth test case: 

  * 00 is similar to s[1..2] = 10; 
  * 00 is similar to s[2..3] = 01. 
import sys,math
try:sys.stdin,sys.stdout=open('input.txt','r'),open('out.txt','w')
except:pass
from sys import stdin,stdout;mod=int(1e9 + 7);from statistics import mode
from collections import *;from math import ceil,floor,inf,factorial,gcd,log2,sqrt,log
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()
# print('{:.3f}'.format(1),round(1.123456789,4))
# sys.setrecursionlimit(500000)
def lcm(a,b): return (a*b)//gcd(a,b)
def setbits(n):return bin(n).count('1')
def resetbits(n):return bin(n).count('0')
def modinv(n,p):return pow(n,p-2,p)
def ncr(n,r):
    num,den=1,1;r=min(n,n-r)
    for i in range(r):num*=(n-i);den*=(i+1)
    return num//den
def ncr_p(n, r, p):
    num,den=1,1;r=min(r,n-r)
    for i in range(r):num = (num * (n - i)) % p ;den = (den * (i + 1)) % p
    return (num * modinv(den,p)) % p
def isPrime(num) :
    if num<=1:return False
    if num==2 or n==3:return True
    if (num % 2 == 0 or num % 3 == 0) :return False
    m = int(num**0.5)+1
    for i in range(5,m,6):
        if (num % i == 0 or num % (i + 2) == 0) :return False
    return True
def bin_search(arr, low, high, val):
    while low <= high:
        mid = low + (high - low) // 2;
        if arr[mid] == val:return mid
        elif arr[mid] < val:low = mid + 1
        else:high = mid - 1
    return -1
def sumofdigit(num):
    count=0;
    while num : count+=num % 10;num //= 10;
    return count;
def inputmatrix():
    r,c=iia();mat=[0]*r;
    for i in range(r):mat[i]=iia();
    return r,c,mat;
def prefix_sum(n,arr):
    for i in range(1,n):arr[i]+=arr[i-1]
    return arr;
def binomial(n, k):
    if 0 <= k <= n:
        ntok = 1;ktok = 1
        for t in range(1, min(k, n - k) + 1):ntok *= n;ktok *= t;n -= 1
        return ntok // ktok
    else:return 0
def divisors(n):
    res = [];
    for i in range(1,ceil(sqrt(n))+1):
        if n%i == 0:
            if i==n//i:res.append(i)
            else:res.append(i);res.append(n//i)
    return res;
# code start from here-

for _ in range(ii1()):
    n = ii1()
    s = is1()
    # ans=(1<<n)-1
    ans=0
    # print(ans,bin(ans))
    flag=True
    for i in range(0,n):
        ss='0b'
        for j in range(i,i+n):
            ss+=s[j]
        if flag:
            ans=int(ss,2)
            flag=False
        else:
            ans&=int(ss,2)

    a=bin(ans)[2::]
    rem=n-len(a)
    res='0'*rem + a
    print(res)
