<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>

#define ll long long
#define ld long double
#define ull unsigned long long

#define pii pair<int, int>
#define pll pair<ll,ll>
#define pld pair<ld, ld>
#define vll vector<ll>
#define vld vector<ld>
#define vii vector<int>
#define vs vector<string>
#define vc vector<char>
#define vb vector<bool>
#define vpii vector<pii>
#define vpll vector<pll>
#define vpld vector<pld>
#define sii set<int>
#define sll set<ll>
#define sld set<ld>
#define sc set<char>
#define ss set<string>

#define all(a) a.begin(), a.end()
#define allr(a) a.rbegin(), a.rend()

#define debug(a) cout << a << endl;
#define debug2(a, b) cout << a <<  ' ' << b << endl;
#define debug3(a, b, c) cout << a << ' ' << b << ' ' << c << endl;
#define debug4(a, b, c, d) cout << a << ' ' << b << ' ' << c << ' ' << d << endl;
#define debug5(a, b, c, d, e) cout << a << ' ' << b << ' ' << c << ' ' << d << ' ' << e << endl;

#define f(a, b, c) for (auto a = b; a < c; a++)
#define fe(a, b, c) for (auto a = b; a <= c; a++)
#define fr(a, b, c) for (auto a = b; a >= c; a--)

#define cinvec(v) f(i, 0, v.size()) cin >> v[i]
#define coutvec(v) for (auto i : v) cout << i << " "; cout << endl;

#define pb push_back

#define FastIO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;

const int MAX_INT = INT32_MAX;
const ll MAX_LL = INT64_MAX;
const ll mod = 1e9 + 7;
const int N = 1;
const ld pi = 3.14159265359;
bool primes[N + 1];

void sieve()
{
    memset(primes, true, sizeof(primes));
    primes[0] = primes[1] = false;
    for (int i = 2; i * i <= N; i++){
        if (primes[i]){
            for (int j = i * i; j <= N; j += i) primes[j] = false;
        }
    }
}

void moveOneStep(ll& n, ll& d, ll q)
{
    ll next = n - d * q;
    n = d;
    d = next;
}

bool isPrime(ll n)
{
    if (n <= 1) return false;
    if (n == 2) return true;
    fe (i, 2, sqrt(n)) if (n % i == 0) return false;
    return true;
}

bool palindrome(const string& s)
{
    string reversedS = s;
    reverse(all(reversedS));
    if (s == reversedS) return true;
    else return false;
}

ll fastPow(ll base, ll power)
{
    if (!power) return 1;
    if (power == 1) return base;
    ll val = fastPow(base, power / 2);
    return (power % 2 == 0) ? val * val : val * val * base;
}

ll modPow(ll base, ll power, ll M)
{
    if (power == 1) return base;
    ll val = modPow(base, power / 2, M);
    return (power % 2 == 0) ? (val * val) % M : (((val * val) % M) * base) % M;
}

ll gcd(ll a, ll b)
{
    if (!b) return a;
    return gcd(b, a % b);
}

ll lcm(ll a, ll b)
{
    return a * b / gcd(a, b);
}

ll eGCD(ll r0, ll r1, ll& x0, ll& y0)
{
    ll x1, y1;
    x0 = y1 = 1;
    x1 = y0 = 0;
    while (r1) {
        ll q = r0 / r1;
        moveOneStep(x0, x1, q);
        moveOneStep(y0, y1, q);
        moveOneStep(r0, r1, q);
    }
    return r0;
}

ll modInv(ll c, ll M)
{
    ll x, y;
    ll g = eGCD(c, M, x, y);
    if (g != 1) return -1;
    return (x + M) % M;
}

ll modInvFer(ll c, ll m)
{
    return modPow(c, m - 2, m);
}

ll npr(ll n, ll r)
{
    ll res = 1; fe (i, n - r + 1, n) res *= i;
    return res;
}

ll ncr(ll n, ll r)
{
    ll res = 1; ll rFact = 1;
    fe (i, n - r + 1, n){
        res *= i;
        if (res % rFact == 0 && rFact <= r) res /= rFact, rFact++;
    }
    return res;
}

sll getDivisors(ll val)
{
    sll st;
    fe (i, 1, sqrt(val) + 7) if (val % i == 0) st.insert(i), st.insert(val / i);
    return st;
}

// *****CODE STARTS HERE*****

int main() {
    FastIO
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    int t; cin >> t;
    while (t--) {
        ll n, m; cin >> n >> m;
        string s; cin >> s;
        while (m--) {
            bool done = 1;
            vii indices;
            f(i, 0, n) {
                if (i == 0) {
                    if (s[i] == '0' && s[i + 1] == '1') s[i] = '1', done = 0;
                }
                else if (i == n - 1) {
                    if (s[i] == '0' && s[i - 1] == '1') s[i] = '1', done = 0;
                }
                else {
                    if (s[i] == '0' && s[i - 1] + s[i + 1] == 97) {
                        indices.pb(i), done = 0;
                    }
                }
            }
            for (auto i: indices) s[i] = '1';
            if (done) break;
        }
        cout << s << endl;
    }
    return 0;
}