Devu loves to play with binary strings a lot. One day he borrowed a binary string s of size n from his friend Churu. Before starting to play with it, he wants to make sure that string does not contain more than  k consecutive equal characters. For achieving that, only kind of operation he is allowed to perform is to flip any ith character of the string. 

As Devu is always in hurry to meet his girlfriend, he wants you to help him in finding out the minimum number of operations he will need. Also he wants you to print one of the possible modified string too.

-----Input-----
- First line of input contains an integer T denoting the number of test cases. 
- For each test case, there are two lines. 
- First line contains two space separated integers n, k as defined in the problem. 
- Next line contains string s of size n.

-----Output-----
- For each test case, print two lines.
- First line should contain an integer corresponding to minimum number of operations Devu needs.
- In second line, print one of the possible modified strings.

-----Constraints-----
Subtask #1: 20 points
- 1 ≤ T ≤ 100, 1 ≤ n ≤ 20, 1 ≤ k ≤ n

Subtask #2: 35 points
- 1 ≤ T ≤ 102, 1 ≤ n ≤ 103, 1 ≤ k ≤ n

Subtask #3: 45 points
- 1 ≤ T ≤ 105, 1 ≤ n ≤ 105, 1 ≤ k ≤ n
- Sum of n over all the test cases is ≤ 106 

-----Example-----
Input:
3
2 1
11
2 2
11
4 1
1001

Output:
1
10
0
11
2
1010

-----Explanation-----
Example case 1: As 1 is occurring twice consecutively, we can convert 11 to 10 in a single operation.
Example case 2: You don't need to modify the string as it does not have more than 2 equal consecutive character.
Example case 3: As 0 is occurring twice consecutively, we can convert 1001 to 1010 in a two operations (Flip third and fourth character).

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'T= int(input());\n\nfor i in range(T):\n n,k = list(map(int,input().split()));\n s=list(map(int,input()));\n\n if k==1:\n  s_0 ={};\n  s_1={};\n  c0=0;\n  c1=0;\n  for j in range(n):\n   if(j%2==0):\n    s_1[j]=1;\n    s_0[j]=0;\n   else:\n    s_1[j]=0;\n    s_0[j]=1;\n  for j in range(n):\n   if(s_0[j]-s[j]!=0):\n    c0+=1;\n   if(s_1[j]-s[j]!=0):\n    c1+=1;\n\n  if c0<c1:\n   print(c0);\n   p_s="";\n   for j in range(n):\n    p_s+=str(s_0[j]);\n   print(p_s);\n  else:\n   print(c1);\n   p_s="";\n   for j in range(n):\n    p_s+=str(s_1[j]);\n   print(p_s);\n\n else:\n  count=1;\n  c=s[0];\n  flips=0\n  for j in range(1,n):\n   if(s[j]==c):\n    count+=1;\n    #print count;\n    if count > k:\n     if(j+1<n and s[j]==s[j+1]):\n      if(s[j]==1):\n       s[j]=0;\n      else:\n       s[j]=1;\n     else:\n      if(s[j-1]==1):\n       s[j-1]=0;\n      else:\n       s[j-1]=1;\n     flips+=1;\n     count=1;\n\n\n   elif(s[j]!=c):\n    count=1;\n   c=s[j];\n\n  print(flips);\n  p_s="";\n  for j in range(n):\n   p_s+=str(s[j]);\n  print(p_s);'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13915