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 java.util.*;
import java.io.*;
import java.lang.*;
import java.math.*;
import java.text.*;
import java.time.*;
// import java.util.ArrayList
// import java.util.LinkedList
// import java.util.Vector
// import java.util.Stack
// import java.util.LinkedHashSet  (HashSet)
// import java.util.TreeSet (SortedSet,NavigableSet)




public class Solution
{
    int intmin=Integer.MIN_VALUE;
    int intmax=Integer.MAX_VALUE;
    long longmax=Long.MAX_VALUE;
    long longmin=Long.MIN_VALUE;
    long modlong=(long)(Math.pow(10,9)+7);
    public static void main(String args[])
    {
        FastReader scan=new FastReader();
        int t=scan.nextInt();
        while(t-- !=0)
        {
            int n=scan.nextInt();
            String s=scan.next();
            String p=s.substring(n-1,n);
            String q="";
            for(int i=0;i<n;i++)
            {
                q+=p;
            }
            System.out.println(q);
        }
        
    }
}

class FastReader 
{ 
    BufferedReader br; 
    StringTokenizer st; 

    public FastReader() 
    { 
        br = new BufferedReader(new InputStreamReader(System.in)); 
    } 
    String next() 
    { 
        while (st == null || !st.hasMoreElements()) 
        { 
            try
            { 
                st = new StringTokenizer(br.readLine()); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
        } 
        return st.nextToken(); 
    } 

    int nextInt() 
    { 
        return Integer.parseInt(next()); 
    } 

    long nextLong() 
    { 
        return Long.parseLong(next()); 
    } 

    double nextDouble() 
    { 
        return Double.parseDouble(next()); 
    } 

    String nextLine() 
    { 
        String str = ""; 
        try
        { 
            str = br.readLine(); 
        } 
        catch (IOException e) 
        { 
            e.printStackTrace(); 
        } 
        return str; 
    } 
} 



class Heap
{
    ArrayList a=new ArrayList(1);
    int length=0;
    Heap(int k)
    {
        a.add(k);
        length=1;
    }
    Heap()
    {
        a.add(0);
        length=1;
    }
    public void insert(int k)
    {
        a.add(k);
        length++;
        increaseKey(length-1,k);
    }
    protected void increaseKey(int l,int k)
    {
        int p=(l-1)/2;
        while(l!=0 && (int)a.get(p)>k)
        {
            a.set(l,(int)a.get(p));
            a.set(p,k);
            l=p;
            p=(l-1)/2;
        }
    }
    public int maximum()
    {
        return (int)a.get(0);
    }
    public int remove()
    {
        int k=(int)a.get(0);
        a.set(0,(int)a.get(length-1));
        length--;
        heapify(0);
        return k;
        
    }
    protected void heapify(int i)
    {
        int l=(2*i)+1;
        int r=(2*i)+2;
        int smallest=(int)a.get(i);
        int u=i;
        if(l<length && (smallest>(int)a.get(l)))
        {
            smallest=(int)a.get(l);
            u=l;
        }
        if(r<length && (smallest>(int)a.get(r)))
        {
            smallest=(int)a.get(r);
            u=r;
        }
        if(smallest!=(int)a.get(i))
        {
            a.set(u,(int)a.get(i));
            a.set(i,smallest);
            heapify(u);
        }
    }
}



class Queue 
{ 
    int front, rear, size; 
    int  capacity; 
    int array[]; 
       
    public Queue(int capacity) { 
         this.capacity = capacity; 
         front = this.size = 0;  
         rear = capacity - 1; 
         array = new int[this.capacity]; 
            
    } 
       
    // Queue is full when size becomes equal to  
    // the capacity  
    boolean isFull(Queue queue) 
    {  return (queue.size == queue.capacity); 
    } 
       
    // Queue is empty when size is 0 
    boolean isEmpty(Queue queue) 
    {  return (queue.size == 0); } 
       
    // Method to add an item to the queue.  
    // It changes rear and size 
    void enqueue( int item) 
    { 
        if (isFull(this)) 
            return; 
        this.rear = (this.rear + 1)%this.capacity; 
        this.array[this.rear] = item; 
        this.size = this.size + 1; 
        System.out.println(item+ " enqueued to queue"); 
    } 
       
    // Method to remove an item from queue.   
    // It changes front and size 
    int dequeue() 
    { 
        if (isEmpty(this)) 
            return Integer.MIN_VALUE; 
           
        int item = this.array[this.front]; 
        this.front = (this.front + 1)%this.capacity; 
        this.size = this.size - 1; 
        return item; 
    } 
       
    // Method to get front of queue 
    int front() 
    { 
        if (isEmpty(this)) 
            return Integer.MIN_VALUE; 
           
        return this.array[this.front]; 
    } 
        
    // Method to get rear of queue 
    int rear() 
    { 
        if (isEmpty(this)) 
            return Integer.MIN_VALUE; 
           
        return this.array[this.rear]; 
    } 
} 




class Graph
{
    int v=0,e=0;                        // v-> no of vertices
                                        // e-> no of edges
    LinkedList adj[]=new LinkedList[v];
    int[] color=new int[v];             // 1 -> white
                                        // 2 -> grey
                                        // 3 -> black
    int[] d=new int[v];
    int[] p=new int[v];
    Graph()
    {
        initialize();
    }
    protected void initialize()
    {
        for(int i=0;i<v;i++)
        {
            color[i]=1;
            d[i]=-1;
            p[i]=-1;
        }
    }
    public void bfs(int s)
    {
        initialize();
        color[s-1]=2;
        d[s-1]=0;
        p[s-1]=-1;
        Queue q=new Queue(v);
        q.enqueue(s-1);
        while(q.isEmpty(q)!=true)
        {
            int u=q.dequeue();
            while(adj[u]!=null)
            {
                int v=(int)adj[u].get(0);
                if(color[(int)(adj[u].get(0))]==1)
                {
                    color[(int)(adj[u].get(0))]=2;
                    d[v]=d[u]+1;
                    p[v]=u;
                    q.enqueue(v);
                }
            }
            color[u]=3;
        }
    }
    public void dfs(int s)
    {
        
    }
}



class Functions
{
    //KMP PATTERN MATCHER
    public static int kmp_matcher(String t,String p)
    {
        int n=t.length();
        int m=p.length();
        int pie[]=compute_prefix_function(p);
        int q=0;
        int z=0;
        for(int i=1;i<=n;i++)
        {
            while(q>0 && (p.charAt(q)!=t.charAt(i-1)))
            {
                q=pie[q-1];
            }
            if(p.charAt(q)==t.charAt(i-1))
            {
                q++;
            }
            if(q==m)
            {
                z++;
                q=pie[q-1];
            }
        }
        return z;
    }
    public static int[] compute_prefix_function(String p)
    {
        int m=p.length();
        int pie[]=new int[m];
        pie[0]=0;
        int k=0;
        for(int q=2;q<=m;q++)
        {
            while(k>0 && (p.charAt(k)!=p.charAt(q-1)))
            {
                k=pie[k-1];
            }
            if(p.charAt(k)==p.charAt(q-1))
            {
                k++;
            }
            pie[q-1]=k;
        }
        return pie;
    }
    
    //IINSERTION SORT
    public static int[] insertSort(int[] a)
    {
        int n=a.length;
        for(int i=0;i<n;i++)
        {
           int k=a[i];
           int l=i;
            for(int j=i-1;j>=0;j--)
            {
                if(a[j]>k)
                {
                    a[l]=a[j];
                    a[j]=k;
                    l=j;
                    
                }
            }
            
        }
        return a;
    }
    
    //COUNTING SORT
    public static long[] countingSort(long[] a,int k)
    {
        long b[]=new long[k+1];
        long c[]=new long[k+1];
        for(int i=0;i<=k;i++)
        {
            c[i]=0;
        }
        for(int i=0;i<a.length;i++)
        {
            c[(int)a[i]]++;
        }
        for(int i=1;i<=k;i++)
        {
            c[i]+=c[i-1];
        }
        for(int i=a.length-1;i>=0;i--)
        {
            b[(int)c[(int)a[i]]-1]=a[i];
            c[(int)a[i]]--;
        }
        return b;
    }
    
    
    
    //UNION FIND
     public static int find(int p[],int i)
    {
        if(p[i]==i)
        {
            return i;
        }
        else {
            int result=find(p,p[i]);
            p[i]=result;
            return result;
        }
    }
    public static void union(int p[],int i,int j)
    {
        int irep=find(p,i);
        int jrep=find(p,j);
        if(irep==jrep)
        {
            return;
        }
        else 
        {
            p[irep]=jrep;
        }
    }
    
    //addBinary
    public static String addBinary(String a, String b) {
        int a1=a.length();
        int b1=b.length();
        String c="";
        int x=a1-1;
        int y=b1-1;
        int carry=0;
        while((x>=0)||(y>=0))
        {
            int p=0;
            int q=0;
            if(x<0)
                p=0;
            else
                p=(a.charAt(x)-48);
            if(y<0)
                q=0;
            else
                q=(b.charAt(y)-48);
            
            if((p==1)&&(q==1))
            {
                if(carry==1)
                    c=1+c;
                else 
                    c=0+c;
                carry=1;
            }
            else if(carry==1)
            {
                if((p==1)||(q==1))
                {
                    c=0+c;
                    carry=1;
                }
                else
                {
                    c=1+c;
                    carry=0;
                }
            }
            else
            {
                if((p==1)||(q==1))
                {
                    c=1+c;
                }
                else
                {
                    c=0+c;
                }
            }
            x--;
            y--;
        }
        if(carry==1)
            c=1+c;
        return c;
    }
    //ncr
    public static long modPow(long a, long x, long p) {
        //calculates a^x mod p in logarithmic time.
        long res = 1;
        while(x > 0) {
            if( x % 2 != 0) {
                res = (res * a) % p;
            }
            a = (a * a) % p;
            x /= 2;
        }
        return res;
    }

    public static long modInverse(long a, long p) {
        //calculates the modular multiplicative of a mod m.
        //(assuming p is prime).
        return modPow(a, p-2, p);
    }
    public static long modBinomial(long n, long k, long p) {
        // calculates C(n,k) mod p (assuming p is prime).

        long numerator = 1; // n * (n-1) * ... * (n-k+1)
        for (int i=0; i<k; i++) {
            numerator = (numerator * (n-i) ) % p;
        }

        long denominator = 1; // k!
        for (int i=1; i<=k; i++) {
            denominator = (denominator * i) % p;
        }

        // numerator / denominator mod p.
        return ( numerator* modInverse(denominator,p) ) % p;
    }

}



