<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 
#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set> 
#include<cmath>

/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>
*/
 
using namespace std;
 
/*--------------------------Containers------------------------*/
typedef long long int ll;
typedef unsigned long long int ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<int, int> pi;
typedef pair<ll, ll> pll;
typedef vector<pi> vpi;
typedef vector<pll> vpll;
/*------------------------------------------------------------*/
 
/*--------------------------Limits & Constants----------------*/
#define MAX 200007
#define MOD int(1e9 + 7)
#define INF ll(8230219982008199610)
#define MINF ll(-8230219982008199610)
#define IL INT_MAX
#define MIL INT_MIN
#define PI 2 * acos(0.0)
/*------------------------------------------------------------*/
 
/*--------------------------Macros----------------------------*/
#define fast                          \
    ios_base::sync_with_stdio(false); \
    cin.tie(0);                       \
    cout.tie(0)
#define pf printf
#define sc scanf
#define all(a) (a).begin(), (a).end()
#define sz(x) int(x.size())
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define ff first
#define ss second
#define mem(a, n) memset(a, n, sizeof(a))
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) (a * (b / gcd(a, b)))
#define forn(i, n) for (int i = 0; i < n; i++)
#define loop1(i, n) for (int i = 1; i <= n; i++)
#define rev0(i, n) for (int i = n - 1; i >= 0; i--)
#define rev1(i, n) for (int i = n; i > 0; i--)
/*------------------------------------------------------------*/
 
/*----------------------Scans and Prints----------------------*/
#define sc1(x) scanf("%d", &x)
#define sc2(x, y) scanf("%d %d", &x, &y)
#define sc3(x, y, z) scanf("%d %d %d", &x, &y, &z)
#define scd1(x) scanf("%lld", &x)
#define scd2(x, y) scanf("%lld %lld", &x, &y)
#define pf1(x) printf("%d\n", x)
#define pf2(x, y) printf("%d %d\n", x, y)
#define pfd1(x) printf("%lld\n", x)
#define pfd2(x, y) printf("%lld %lld\n", x, y)
#define t_case(t) for (int cs = 1; cs <= t; cs++)
#define print(a, n)                     \
    for (int pr = 0; pr < int(n); pr++) \
        cout << a[pr] << " ";           \
    cout << endl
#define printa(x) cout << x << endl;
#define debug cout << " OK " << endl
/*------------------------------------------------------------*/


int main()
{
    ll t;
    cin>>t;
    while(t--){
        ll n,m;
        cin>>n>>m;
        string s;
        cin>>s;
        while(m--){
            string s1=s;
            ll change=0;
            forn(i,n){

                if(i==0){
                    if(s[i]=='0' && s[i+1]=='1'){
                        s1[i]='1';
                        ++change;
                    }
                    continue;
                }
                if(i==n-1){
                    if(s[i]=='0'&&s[i-1]=='1'){
                        s1[i]='1';
                        ++change;
                    }
                    continue;
                }
                if(s[i]=='0'){
                    if(s[i+1]=='1'&&s[i-1]=='1'){

                    }
                    else{
                        if(s[i+1]=='0'&&s[i-1]=='0'){

                        }
                        else{
                            s1[i]='1';
                            ++change;
                        }
                    }
                }
                

            }
            s=s1;
            //cout<<s<<endl;
            
            if(change==0)
            break;
           
        }
        cout<<s<<endl;
       // cout<<endl;
    }
    

  
}