<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 "bits/stdc++.h"
using namespace std;
#define int long long
void __print(int x)
{
    cerr << x;
}
void __print(long x) { cerr << x; }
// void __print(long long x) {cerr << x;}
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }

template <typename T, typename V>
void __print(const pair<T, V> &x)
{
    cerr << '{';
    __print(x.first);
    cerr << ',';
    __print(x.second);
    cerr << '}';
}
template <typename T>
void __print(const T &x)
{
    int f = 0;
    cerr << '{';
    for (auto &i : x)
        cerr << (f++ ? "," : ""), __print(i);
    cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void print(T t, V... v)
{
    _print(t);
    if (sizeof...(v))
        cerr << ", ";
    _print(v...);
}
#ifdef Local_Debug
#define debug(x...)               \
    cerr << "[" << #x << "] = ["; \
    _print(x)
#else
#define debug(x...)
#endif

// g++ file_name.cpp -DLocal_Debug
#define ll long long
#define pb push_back
#define NULL __null
#define fast()                        \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);
#define F first
#define S second
#define sz(x) (int)x.size()
#define all(x) x.begin(), x.end()
#define rsort(x) sort(x, greater<int>())
#define endl "\n"
#define gcd __gcd
#define lcm(a, b) (a * b) / gcd(a, b)
#define deci(n) fixed << setprecision(n)
#define win freopen("input.txt", "r", stdin);
#define wout freopen("output.txt", "w", stdout);
#define tfor(i, j, k, in) for (int i = j; i < k; i += in)
#define rfor(i, j, k, in) for (int i = j; i >= k; i -= in)
#define rep(i, j, k) tfor(i, j, k, 1)
#define rrep(i, j, k) rfor(i, j, k, 1)
#define Y cout << "Yes\n"
#define N cout << "NO\n"
#define testc()       \
    int test_case;    \
    cin >> test_case; \
    rep(i, 0, test_case)

typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<string> vs;
typedef vector<vector<int>> vvi;
typedef pair<int, int> pi;
typedef vector<pi> vpi;
typedef map<int, int> mi;
typedef map<int, bool> mb;

int Power(int a, int n, int mod)
{
    int res = 1;
    while (n)
    {
        if (n % 2 != 0)
        {
            res = ((res % mod) * (a % mod)) % mod;
            n--;
        }
        else
        {
            a = ((a % mod) * (a % mod)) % mod;
            n /= 2;
        }
    }
    return res;
}

bool isPrime(int n)
{
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;

    if (n % 2 == 0 || n % 3 == 0)
        return false;

    for (int i = 5; i * i <= n; i = i + 6)
        if (n % i == 0 || n % (i + 2) == 0)
            return false;

    return true;
}

int md = 1e9 + 7;
vi fact, inv;

void inverse(ll n)
{
    if (n >= (int)inv.size())
    {
        ll size = (int)inv.size();
        size = size == 0 ? 1 : size;
        inv.resize(n + 1);
        inv[0] = 1;
        for (ll i = size; i <= n; i++)
            inv[i] = Power(fact[i], md - 2, md);
    }
}

void factorial(ll n)
{
    if (n >= (int)fact.size())
    {
        ll size = (int)fact.size();
        size = size == 0 ? 1 : size;
        fact.resize(n + 1);
        fact[0] = 1;
        for (ll i = size; i <= n; i++)
            fact[i] = (fact[i - 1] * i) % md;
    }
}

ll ncr(ll n, ll r) { return (((fact[n] * inv[r]) % md) * inv[n - r]) % md; }

//==============================================  QUESTIONS  ===========================================
void solve()
{
    int n,m;
    cin>>n>>m;
    string s;
    cin>>s;
    vi os;
    if( s[0] == '1' && s[1] == '0')
        os.pb(1);
    for(int i=1;i<n-1;i++){
     if(s[i]=='1'&&s[i-1]=='0'||s[i]=='1'&&s[i+1]=='0')os.pb(i+1);
    }
    if (s[n-1] == '1' && s[n-2] == '0')
        os.pb(n);

    for(int i=0;i<sz(os)-1;i++){
        int zs=os[i+1]-os[i]-1;
        int tod=m;
        if(m>=zs/2)tod=zs/2;
        for(int j=0;j<tod;j++)s[j+os[i]]='1';
        for(int j=0;j<tod;j++ )s[os[i+1]-2-j]='1';
    }
    if(sz(os)>0){
        int fs=os[0],ls=os[sz(os)-1];
        for(int j=0;j<m&&(fs-2-j)>=0;j++)s[fs-2-j]='1';
        for (int j =0; j <m&&ls+j<n; j++)
            s[ls+j] = '1';
    }
    cout<<s<<endl;
}
//===================================================MAIN BLOCK=============================================================
void solveT()
{
    testc()
    {
        solve();
    }
}

int32_t main()
{
    fast();
    solveT();
    //solve();
    return 0;
}

//===========================================================================================================================