After bracket sequences Arthur took up number theory. He has got a new favorite sequence of length *n* (*a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub>), consisting of integers and integer *k*, not exceeding *n*.

This sequence had the following property: if you write out the sums of all its segments consisting of *k* consecutive elements (*a*<sub class="lower-index">1</sub>  +  *a*<sub class="lower-index">2</sub> ...  +  *a*<sub class="lower-index">*k*</sub>,  *a*<sub class="lower-index">2</sub>  +  *a*<sub class="lower-index">3</sub>  +  ...  +  *a*<sub class="lower-index">*k* + 1</sub>,  ...,  *a*<sub class="lower-index">*n* - *k* + 1</sub>  +  *a*<sub class="lower-index">*n* - *k* + 2</sub>  +  ...  +  *a*<sub class="lower-index">*n*</sub>), then those numbers will form strictly increasing sequence.

For example, for the following sample: *n* = 5,  *k* = 3,  *a* = (1,  2,  4,  5,  6) the sequence of numbers will look as follows: (1  +  2  +  4,  2  +  4  +  5,  4  +  5  +  6) = (7,  11,  15), that means that sequence *a* meets the described property. 

Obviously the sequence of sums will have *n* - *k* + 1 elements.

Somebody (we won't say who) replaced some numbers in Arthur's sequence by question marks (if this number is replaced, it is replaced by exactly one question mark). We need to restore the sequence so that it meets the required property and also minimize the sum |*a*<sub class="lower-index">*i*</sub>|, where |*a*<sub class="lower-index">*i*</sub>| is the absolute value of *a*<sub class="lower-index">*i*</sub>.
The first line contains two integers *n* and *k* (1 ≤ *k* ≤ *n* ≤ 10<sup class="upper-index">5</sup>), showing how many numbers are in Arthur's sequence and the lengths of segments respectively.

The next line contains *n* space-separated elements *a*<sub class="lower-index">*i*</sub> (1 ≤ *i* ≤ *n*).

If *a*<sub class="lower-index">*i*</sub>  =  ?, then the *i*-th element of Arthur's sequence was replaced by a question mark. 

Otherwise, *a*<sub class="lower-index">*i*</sub> ( - 10<sup class="upper-index">9</sup> ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>) is the *i*-th element of Arthur's sequence.
INF = 10000000001
def fill(s):
  s.insert(0, -INF)
  s.append(INF)
  i = 0
  for j in filter(lambda x: s[x] != '?', range(1, len(s))):
    d = i - j
    s[j] = int(s[j])
    if s[i] > s[j]+d:
      raise
    a = max(min(d//2, s[j]+d), s[i])
    for t in range(i+1, j):
      s[t] = a + t - i
    i = j
  return s[1:-1]
n, k = map(int, input().split())
s = input().split()
try:
  g = [fill([s[i] for i in range(j, n, k)]) for j in range(k)]
  print(' '.join(str(g[i%k][i//k]) for i in range(n)))
except:
  print('Incorrect sequence')