You are given a binary string of length n (i. e. a string consisting of n characters '0' and '1').

In one move you can swap two adjacent characters of the string. What is the lexicographically minimum possible string you can obtain from the given one if you can perform no more than k moves? It is possible that you do not perform any moves at all.

Note that you can swap the same pair of adjacent characters with indices i and i+1 arbitrary (possibly, zero) number of times. Each such swap is considered a separate move.

You have to answer q independent test cases.

Input

The first line of the input contains one integer q (1 ≤ q ≤ 10^4) — the number of test cases.

The first line of the test case contains two integers n and k (1 ≤ n ≤ 10^6, 1 ≤ k ≤ n^2) — the length of the string and the number of moves you can perform.

The second line of the test case contains one string consisting of n characters '0' and '1'.

It is guaranteed that the sum of n over all test cases does not exceed 10^6 (∑ n ≤ 10^6).

Output

For each test case, print the answer on it: the lexicographically minimum possible string of length n you can obtain from the given one if you can perform no more than k moves.

Example

Input


3
8 5
11011010
7 9
1111100
7 11
1111100


Output


01011110
0101111
0011111

Note

In the first example, you can change the string as follows: 1\underline{10}11010 → \underline{10}111010 → 0111\underline{10}10 → 011\underline{10}110 → 01\underline{10}1110 → 01011110. 

In the third example, there are enough operations to make the string sorted.

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.*;
import java.math.*;
public class Main
{
    static double res[];
    static boolean vis[];
    static int d[];
    static ArrayList<Integer> a[];
    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());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
/*  static  void sieveOfEratosthenes(int n)
 {
     // Create a boolean array "prime[0..n]" and initialize
     // all entries it as true. A value in prime[i] will
     // finally be false if i is Not a prime, else true.

     for(int i=0;i<n;i++)
         prime[i] = true;

     for(int p = 2; p*p <=n; p++)
     {
         // If prime[p] is not changed, then it is a prime
         if(prime[p] == true)
         {
             // Update all multiples of p
             for(int i = p*2; i <= n; i += p)
                 prime[i] = false;
         }
     }

 }*/

    static long power(long x, long y, long p)
       {

           long res = 1;

           // Update x if it is more
           // than or equal to p
           x = x %p;

           while (y > 0)
           {
               // If y is odd, multiply x
               // with result
               if((y & 1)==1)
                   res = (res * x) %p;

               // y must be even now
               // y = y / 2
               y = y >> 1;
               x = (x * x)%p ;
           }
           return res;
       }
       static long fun(long n, long r) {

        // p holds the value of n*(n-1)*(n-2)...,
        // k holds the value of r*(r-1)...
        long p = 1, k = 1;

        // C(n, r) == C(n, n-r),
        // choosing the smaller value
        if (n - r < r) {
            r = n - r;
        }

        if (r != 0) {
            while (r > 0) {
                p *= n;
                k *= r;

                // gcd of p, k
                long m = __gcd(p, k);

                // dividing by gcd, to simplify product
                // division by their gcd saves from the overflow
                p /= m;
                k /= m;

                n--;
                r--;
            }

            // k should be simplified to 1
            // as C(n, r) is a natural number
            // (denominator should be 1 ) .
        } else {
            p = 1;
        }

        // if our approach is correct p = ans and k =1
        return p;
    }

    static long __gcd(long n1, long n2) {
        long gcd = 1;

        for (int i = 1; i <= n1 && i <= n2; ++i) {
            // Checks if i is factor of both integers
            if (n1 % i == 0 && n2 % i == 0) {
                gcd = i;
            }
        }
        return gcd;
    }


    public static void main(String[] args)
    {
        FastReader sc=new FastReader();
        HashMap<Long, Long> hm=new HashMap<>();
        ArrayList<Long> adj=new ArrayList<>();
        int t=sc.nextInt();
        StringBuilder sb=new StringBuilder();
        while(t-->0)
        {
          int n=sc.nextInt();
          long k=sc.nextLong();
          String str=sc.next();
          char c[]=str.toCharArray();
          PriorityQueue<Integer> pq=new PriorityQueue<>();
          for( int i=0;i<n;i++)
          {
            if(c[i]=='1')
            {
              pq.add(i);
            }
            else if(c[i]=='0')
            {
              if(pq.size()>0)
              {
                int x=pq.remove();
                if(i-x<=k)
                {
                c[x]='0';
                c[i]='1';
                pq.add(i);
                k-=(i-x);
              }
              else
              {
                while(!pq.isEmpty()&&i-pq.peek()>k)
                {
                  pq.remove();
                }
                if(!pq.isEmpty())
                x=pq.remove();
                if(i-x<=k)
                {
                c[x]='0';
                c[i]='1';
                pq.add(i);
                k-=(i-x);
              }
              }
              }
            }
          }

          for( int i=0;i<n;i++)
          {
            sb.append(c[i]);
          }
          sb.append("\n");
        }
        System.out.println(sb.toString());

    }
}
