<image>

William really likes the cellular automaton called "Game of Life" so he decided to make his own version. For simplicity, William decided to define his cellular automaton on an array containing n cells, with each cell either being alive or dead.

Evolution of the array in William's cellular automaton occurs iteratively in the following way:

  * If the element is dead and it has exactly 1 alive neighbor in the current state of the array, then on the next iteration it will become alive. For an element at index i the neighbors would be elements with indices i - 1 and i + 1. If there is no element at that index, it is considered to be a dead neighbor. 
  * William is a humane person so all alive elements stay alive. 



Check the note section for examples of the evolution.

You are given some initial state of all elements and you need to help William find the state of the array after m iterations of evolution.

Input

Each test contains multiple test cases. The first line contains the number of test cases t (1 ≤ t ≤ 10^3). Description of the test cases follows.

The first line of each test case contains two integers n and m (2 ≤ n ≤ 10^3, 1 ≤ m ≤ 10^9), which are the total number of cells in the array and the number of iterations.

The second line of each test case contains a string of length n made up of characters "0" and "1" and defines the initial state of the array. "1" means a cell is alive and "0" means it is dead.

It is guaranteed that the sum of n over all test cases does not exceed 10^4.

Output

In each test case output a string of length n, made up of characters "0" and "1" — the state of the array after m iterations of evolution.

Example

Input


4
11 3
01000000001
10 2
0110100101
5 2
10101
3 100
000


Output


11111001111
1110111101
10101
000

Note

Sequence of iterations of evolution for the first test case 

  * 01000000001 — initial state 
  * 11100000011 — first iteration of evolution 
  * 11110000111 — second iteration of evolution 
  * 11111001111 — third iteration of evolution 



Sequence of iterations of evolution for the second test case 

  * 0110100101 — initial state 
  * 1110111101 — first iteration of evolution 
  * 1110111101 — second iteration of evolution 
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

@SuppressWarnings("unused")
public class A{
	
	
    public static void main(String[] args) throws IOException {
    	
    	FastScanner fs = new FastScanner();
    	PrintWriter out = new PrintWriter(System.out);
    	
    	int tt = fs.nextInt();
    	outer:
    	while(tt-->0) {
    		
    		int n = fs.nextInt();
    		int m = fs.nextInt();
    		char[] s = fs.next().toCharArray();
    		
    		
    		for(int i=0;i<n;i++) {
    			if(s[i]=='1') continue;
    			int j = i;
    			while(j<n && s[j]=='0')j++;
    			solve(s, i>0, j<n, i, j, n, m);
    			i=j;
    		}
    		
    		for(int i=0;i<n;i++) out.print(s[i]);
    		out.println();
    	}
    	
    	out.close();
    	
    		
    	
    	
    }
    
    static void solve(char[] s, boolean left, boolean right, int ind1, int ind2, int n, int m) {
    	if(left&&right) {
    		for(int i=ind1; i<Math.min(ind1+m, ind2);i++) s[i] = '1';
    		for(int i=ind2-1;i>=Math.max(ind2-m, ind1);i--) s[i] = '1';
    		if((ind2-ind1)%2==1) s[(ind1+ind2-1)/2] = '0';
    	}
    	else if(left) {
    		for(int i=ind1; i<Math.min(ind1+m, ind2);i++) s[i] = '1';
    	}
    	else if(right) {
    		for(int i=ind2-1;i>=Math.max(ind2-m, ind1);i--) s[i] = '1';
    	}
    }
    
    
    static class SegTree{
		long[] tree; 
		long[] lazy;
		long inf = (long)1e18;
		int n;
		
		SegTree(int n){
			tree = new long[4*n]; lazy = new long[4*n]; this.n = n;
		}
		
		void propagate(int ns, int ne, int node) {
			if(ns!=ne) {
				lazy[2*node+1] += lazy[node];
				lazy[2*node+2] += lazy[node];
			}
			tree[node] += lazy[node];
			lazy[node] = 0;
		}
		
		void updateTree(int qs, int qe, int inc, int ns, int ne, int node) {
			if(lazy[node]!=0) propagate(ns, ne, node);
			if(ns>qe || ne<qs) return;
			if(ns>=qs && ne<=qe) {
				lazy[node] += inc;
				propagate(ns, ne, node);
				return;
			}
			int mid = (ns+ne)/2;
			updateTree(qs, qe, inc, ns, mid, 2*node+1); updateTree(qs, qe, inc, mid+1, ne, 2*node+2);
			tree[node] = Math.min(tree[2*node+1], tree[2*node+2]);
		}
		
		long queryTree(int qs, int qe, int ns, int ne, int node) {
			if(lazy[node]!=0) propagate(ns, ne, node);
			if(ns>qe || ne<qs) return inf;
			if(ns>=qs && ne<=qe) return tree[node];
			int mid = (ns+ne)/2;
			return Math.min(queryTree(qs, qe, ns, mid, 2*node+1), queryTree(qs, qe, mid+1, ne, 2*node+2));
		}
		
		void update(int qs, int qe, int inc) {
			updateTree(qs, qe, inc, 0, n-1, 0);
		}
		
		long query(int qs, int qe) {
			return queryTree(qs, qe, 0, n-1, 0);
		}
		
	}
	
    
    
    
    static final Random random=new Random();
    
    static <T> void shuffle(T[] arr) {
    	int n = arr.length;
    	for(int i=0;i<n;i++	) {
    		int k = random.nextInt(n);
    		T temp = arr[k]; arr[k] = arr[i]; arr[i] = temp;
    	}
    }
    
    	
    static void ruffleSort(int[] a) {
    	int n=a.length;//shuffle, then sort 
    	for (int i=0; i<n; i++) {
    		int oi=random.nextInt(n); int temp=a[oi];
    		a[oi]=a[i]; a[i]=temp;
    	}
    	Arrays.sort(a);
    }
    
    static void ruffleSort(long[] a) {
    	int n=a.length;//shuffle, then sort 
    	for (int i=0; i<n; i++) {
    		int oi=random.nextInt(n); long temp=a[oi];
    		a[oi]=a[i]; a[i]=temp;
    	}
    	Arrays.sort(a);
    }
   
  
    
    static void reverse(int[] arr, int l, int r) {
    	for(int i=l;i<l+(r-l)/2;i++){
    		int temp = arr[i]; arr[i] = arr[r-i+l-1]; arr[r-i+l-1] = temp;
    	}
    }
    
    static void reverse(long[] arr, int l, int r) {
    	for(int i=l;i<l+(r-l)/2;i++){
    		long temp = arr[i]; arr[i] = arr[r-i+l-1]; arr[r-i+l-1] = temp;
    	}
    }
    
    
    static <T> void reverse(T[] arr, int l, int r) {
    	for(int i=l;i<l+(r-l)/2;i++) {
    		T temp = arr[i]; arr[i] = arr[r-i+l-1]; arr[r-i+l-1] = temp;
    	}
    }
    	
    	
    static class FastScanner{
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	StringTokenizer st = new StringTokenizer("");
     
    	public String next(){
    		while(!st.hasMoreElements()){
    			try{
    				st = new StringTokenizer(br.readLine());
    			} catch(IOException e){
    				e.printStackTrace();
    			}
    		}
    		return st.nextToken();
    	}
    		
    	public String nextLine() throws IOException {
    		return br.readLine();
    	}
    		
    	public int nextInt(){
    		return Integer.parseInt(next());
    	}
     
    	public int[] readArray(int n){
    		int[] a = new int[n];
    		for(int i=0;i<n;i++)
    			a[i] = nextInt();
    		return a;
    	}
    		
    	public long nextLong() {
    		return Long.parseLong(next());
    	}
    		
    	public char nextChar() {
    		return next().toCharArray()[0];
    	}
    }
   	
}
