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.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main {

    static class Task {

        private static final int MOD = 998244353;

        private long gcd(long m, long n) {
            if (n == 0) {
                return m;
            }
            return gcd(n, m % n);
        }


        public int pow(long x, long n, int mod) {
            long res = 1;
            x %= mod;
            while (n > 0) {
                if ((n & 1) == 1) {
                    res = res * x % mod;
                }

                x = x * x % mod;
                n >>>= 1;
            }
            return (int) res % mod;
        }


        int[] h, to, next, wt, fa;
        int ct = 0;

        void init(int n, int m) {
            h = new int[n];
            Arrays.fill(h, -1);
            to = new int[m * 2 + 2];
            wt = new int[m * 2 + 2];
            next = new int[m * 2 + 2];
            fa = new int[n];
            Arrays.fill(fa, -1);
            ct = 0;
        }

        void add(int u, int v, int w) {
            to[++ct] = v;
            next[ct] = h[u];
            wt[ct] = w;
            h[u] = ct;
        }


        long[][] mult(long a[][], long b[][], long mod) {
            int l1 = a.length;
            int l2 = b.length;
            int l3 = b[0].length;
            long r[][] = new long[l1][l3];
            for (int i = 0; i < l1; ++i) {
                for (int j = 0; j < l2; ++j) {
                    for (int k = 0; k < l3; ++k) {
                        r[i][k] = (r[i][k] + a[i][j] * b[j][k]) % mod;
                    }
                }
            }
            return r;
        }

        long[][] ones(int len) {
            long r[][] = new long[len][len];
            for (int i = 0; i < len; ++i) {
                r[i][i] = 1L;
            }
            return r;
        }

        long[][] quick(long a[][], int times, long mod) {
            int len = a.length;
            long ans[][] = ones(len);

            while (times > 0) {
                if ((times & 1) == 1) {
                    ans = mult(ans, a, mod);
                }
                a = mult(a, a, mod);
                times >>= 1;
            }

            return ans;
        }

        public static long max(long... a) {
            long x = a[0];
            int len = a.length;
            for (int i = 1; i < len; ++i) {
                x = Math.max(x, a[i]);
            }
            return x;
        }

        public class LazySegTree {
            class Node{
                long val;
                boolean addv = false;
                long addval = 0;
            }

            Node nodes[];
            int len  = 0;
            public LazySegTree(long f[]){
                len  = f.length;
                nodes = new Node[len*4+1];

                for(int i=0;i<nodes.length;++i){
                    nodes[i] = new Node();
                }
                build(1,0,len-1, f);
            }

            public void build(int id, int l,int r,long f[]){
                if(l==r){
                    nodes[id].val = f[l];
                    return;
                }
                int mid = l+r>>1;
                int left = 2*id; int right = left+1;
                build(left,  l,mid,f);
                build(right,  mid+1,r,f);
                pollup(id,left,right);
            }

            public void pollup(int id, int left, int right){
                nodes[id].val = Math.min(nodes[left].val,nodes[right].val);
            }

            public void update(int pos,int val){
                update(1,pos,val,0,len-1);
            }

            private void update(int id, int pos,int val,int l,int r){
                if(l==r){
                    nodes[id].val = val;
                    return;
                }
                int left =id*2; int right = left+1;
                int mid = l+r>>1;
                if(pos<=mid){
                    update(left,pos,val,l,mid);
                }else{
                    update(right,pos,val,mid+1,r);
                }
                pollup(id,left,right);
            }

            public long query(int ql,int qr){
                return query(1,0,len-1,ql,qr);
            }

            private long query(int id,int l,int r,int ql, int qr){
                if(ql<=l&&r<=qr){
                    return nodes[id].val;
                }
                int left =id*2; int right = left+1;
                int mid = l+r>>1;
                long v = 10000000000L;
                if(ql<=mid){
                    long v1 = query(left,l,mid,ql,qr);
                    v = Math.min(v,v1);
                }
                if (qr>mid){
                    long v2 = query(right,mid+1,r,ql,qr);
                    v = Math.min(v,v2);
                }

                return v;
            }

            private void addRange(int id,int l,int r,int ql,int qr,int val){
                if(ql<=l&&r<=qr) {
                    nodes[id].addv = true;
                    nodes[id].val += val;
                    nodes[id].addval = val;
                    return;
                }
                int left = id*2;
                int right = left+1;
                pushdown(id,left,right);
                int mid = l+r>>1;
                if(ql<=mid){
                    addRange(left,l,r,ql,qr,val);
                }
                if(qr>mid){
                    addRange(right,l,r,ql,qr,val);
                }
                pollup(id,left,right);
            }

            private void pushdown(int id,int left,int right){
                if(nodes[id].addv){
                    nodes[left].addv = true;
                    nodes[right].addv = true;
                    nodes[left].addval = nodes[id].addval;
                    nodes[left].val += nodes[left].val;
                    nodes[right].addval = nodes[id].addval;
                    nodes[right].val += nodes[right].val;
                    nodes[id].addv = false;
                }
            }

        }


        public long get(ArrayDeque<Long> q){
            if(q.size()==0){
                return -10000000000000000L;
            }else{
                return q.peekFirst();
            }
        }

        public void solve(int testNumber, InputReader in, PrintWriter out) {
                int t = in.nextInt();
                for(int i=0;i<t;++i){
                    int n  =in.nextInt();
                    StringBuilder sb  =new StringBuilder();
                    String s = in.next();int f = 0;
                    for(int j=0;j<n;++j){
                        sb.append(s.charAt(j+f));f++;
                    }
                    out.println(sb);
                }



        }

    }

    public static String roundS(double result, int scale){
        String fmt = String.format("%%.%df", scale);
        return String.format(fmt, result);
//        DecimalFormat df = new DecimalFormat("0.000000");
//        double result = Double.parseDouble(df.format(result));
    }

    private static void sort(double[] arr) {
        Double[] objArr = Arrays.stream(arr).boxed().toArray(Double[]::new);
        Arrays.sort(objArr);
        for (int i = 0; i < arr.length; i++) {
            arr[i] = objArr[i];
        }
    }

    private static void sort(int[] arr) {
        Integer[] objArr = Arrays.stream(arr).boxed().toArray(Integer[]::new);
        Arrays.sort(objArr);
        for (int i = 0; i < arr.length; i++) {
            arr[i] = objArr[i];
        }
    }

    private static void sort(long[] arr) {
        Long[] objArr = Arrays.stream(arr).boxed().toArray(Long[]::new);
        Arrays.sort(objArr);
        for (int i = 0; i < arr.length; i++) {
            arr[i] = objArr[i];
        }
    }

    private static void solve() {
        InputStream inputStream = System.in;
        //InputStream inputStream  = new FileInputStream(new File("D:\\chrome_download\\travel1.in"));
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task task = new Task();
        task.solve(1, in, out);
        out.close();
    }

    public static void main(String[] args) {
        new Thread(null, () -> solve(), "1", 1 << 10).start();
       // solve();
    }

    static class InputReader {

        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

        public char nextChar() {
            return next().charAt(0);
        }

        public int[] nextArray(int n) {
            int res[] = new int[n];
            for (int i = 0; i < n; ++i) {
                res[i] = nextInt();
            }
            return res;
        }

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

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


    }
}


