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 javax.print.attribute.IntegerSyntax;

import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;
public class Main {

	static boolean[] primecheck = new boolean[1000002];
	static ArrayList<Long> lucky = new ArrayList<>();

	public static void main(String[] args) throws IOException {
		OutputStream outputStream = System.out;
		FastReader in = new FastReader();
		PrintWriter out = new PrintWriter(outputStream);
		PROBLEM solver = new PROBLEM();
		int t = in.nextInt();
		while(t-->0) {
			solver.solve(in, out);
		}
		  out.close();
	}

	public static void luckIsCalling(long n){

		long a = n*10 + 4;
		long b = n*10 + 7;

		lucky.add(a);
		lucky.add(b);

		if(a<=4444444444L) luckIsCalling(a);
		if(b<=4444444444L) luckIsCalling(b);
	}

	static class PROBLEM {
		public void solve(FastReader in, PrintWriter out) {
			  int n = in.nextInt();
			  String s = in.nextLine();
			  char ch = s.charAt(n-1);
			  if(n==1)
			  {
			  	out.println(ch);
			  }
			  else
			  {
			  	StringBuilder st = new StringBuilder("");
			  	st.append(ch);
			  	for(int i=1;i<=(n-2);i++)
				{
					st.append(ch);
				}
			  	st.append(ch);
			  	out.println(st);
			  }
 	}}
		static boolean isPalindrome(char[] s) {
			int flag = 1;
			for (int i = 0; i < s.length; i++) {
				if (s[i] != s[s.length - 1 - i]) {
					flag = 0;
					break;
				}
			}
			if (flag == 1) return true;
			else return false;
		}

		static long gcd(long a, long b) {
			if (b == 0) return a;
			return gcd(b, a % b);
		}

		static boolean isSquare(double a) {
			boolean isSq = false;
			double b = Math.sqrt(a);
			double c = Math.sqrt(a) - Math.floor(b);

			if (c == 0) isSq = true;

			return isSq;
		}

		static int exponentMod(int A, int B, int C) {

			// Base cases
			if (A == 0)
				return 0;
			if (B == 0)
				return 1;

			// If B is even
			long y;
			if (B % 2 == 0) {
				y = exponentMod(A, B / 2, C);
				y = (y * y) % C;
			}

			// If B is odd
			else {
				y = A % C;
				y = (y * exponentMod(A, B - 1,
						C) % C) % C;
			}

			return (int) ((y + C) % C);
		}

		public static class Pair<U extends Comparable<U>, V extends Comparable<V>> implements Comparable<Pair<U, V>> {
			public U x;
			public V y;

			public Pair(U x, V y) {
				this.x = x;
				this.y = y;
			}

			public int hashCode() {
				return (x == null ? 0 : x.hashCode() * 31) + (y == null ? 0 : y.hashCode());
			}

			public boolean equals(Object o) {
				if (this == o)
					return true;
				if (o == null || getClass() != o.getClass())
					return false;
				Pair<U, V> p = (Pair<U, V>) o;
				return (x == null ? p.x == null : x.equals(p.x)) && (y == null ? p.y == null : y.equals(p.y));
			}

			public int compareTo(Pair<U, V> b) {
				int cmpU = x.compareTo(b.x);
				return cmpU != 0 ? cmpU : y.compareTo(b.y);
			}

			public String toString() {
				return String.format("(%s, %s)", x.toString(), y.toString());
			}

		}

		static 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());
			}

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

			boolean nextBoolean() {
				return !(nextInt() == 0);
			}
			// boolean nextBoolean(){return Boolean.parseBoolean(next());}

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

			public int[] readArray(int size) {
				int[] array = new int[size];
				for (int i = 0; i < size; i++) array[i] = nextInt();
				return array;
			}

		}

		private static int[] mergeSort(int[] array) {

			if (array.length <= 1) {
				return array;
			}

			int midpoint = array.length / 2;

			int[] left = new int[midpoint];
			int[] right;

			if (array.length % 2 == 0) {
				right = new int[midpoint];
			} else {
				right = new int[midpoint + 1];
			}

			for (int i = 0; i < left.length; i++) {
				left[i] = array[i];
			}

			for (int i = 0; i < right.length; i++) {
				right[i] = array[i + midpoint];
			}

			int[] result = new int[array.length];

			left = mergeSort(left);
			right = mergeSort(right);

			result = merge(left, right);

			return result;
		}

		private static int[] merge(int[] left, int[] right) {

			int[] result = new int[left.length + right.length];
			int leftPointer = 0, rightPointer = 0, resultPointer = 0;

			while (leftPointer < left.length || rightPointer < right.length) {

				if (leftPointer < left.length && rightPointer < right.length) {

					if (left[leftPointer] < right[rightPointer]) {
						result[resultPointer++] = left[leftPointer++];
					} else {
						result[resultPointer++] = right[rightPointer++];
					}
				} else if (leftPointer < left.length) {
					result[resultPointer++] = left[leftPointer++];
				} else {
					result[resultPointer++] = right[rightPointer++];
				}
			}
			return result;
		}

		public static void Sieve(int n) {

			Arrays.fill(primecheck, true);
			primecheck[0] = false;
			primecheck[1] = false;

			for (int i = 2; i * i < n + 1; i++) {
				if (primecheck[i]) {
					for (int j = i * 2; j < n + 1; j += i) {
						primecheck[j] = false;
					}
				}
			}
		}

	}


