Let *A* = {*a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub>} be any permutation of the first *n* natural numbers {1, 2, ..., *n*}. You are given a positive integer *k* and another sequence *B* = {*b*<sub class="lower-index">1</sub>, *b*<sub class="lower-index">2</sub>, ..., *b*<sub class="lower-index">*n*</sub>}, where *b*<sub class="lower-index">*i*</sub> is the number of elements *a*<sub class="lower-index">*j*</sub> in *A* to the left of the element *a*<sub class="lower-index">*t*</sub> = *i* such that *a*<sub class="lower-index">*j*</sub> ≥ (*i* + *k*).

For example, if *n* = 5, a possible *A* is {5, 1, 4, 2, 3}. For *k* = 2, *B* is given by {1, 2, 1, 0, 0}. But if *k* = 3, then *B* = {1, 1, 0, 0, 0}.

For two sequences *X* = {*x*<sub class="lower-index">1</sub>, *x*<sub class="lower-index">2</sub>, ..., *x*<sub class="lower-index">*n*</sub>} and *Y* = {*y*<sub class="lower-index">1</sub>, *y*<sub class="lower-index">2</sub>, ..., *y*<sub class="lower-index">*n*</sub>}, let *i*-th elements be the first elements such that *x*<sub class="lower-index">*i*</sub> ≠ *y*<sub class="lower-index">*i*</sub>. If *x*<sub class="lower-index">*i*</sub> &lt; *y*<sub class="lower-index">*i*</sub>, then *X* is lexicographically smaller than *Y*, while if *x*<sub class="lower-index">*i*</sub> &gt; *y*<sub class="lower-index">*i*</sub>, then *X* is lexicographically greater than *Y*.

Given *n*, *k* and *B*, you need to determine the lexicographically smallest *A*.
The first line contains two space separated integers *n* and *k* (1 ≤ *n* ≤ 1000, 1 ≤ *k* ≤ *n*). On the second line are *n* integers specifying the values of *B* = {*b*<sub class="lower-index">1</sub>, *b*<sub class="lower-index">2</sub>, ..., *b*<sub class="lower-index">*n*</sub>}.
none
5 2
1 2 1 0 0
4 1 5 2 3 
4 2
1 0 0 0
2 3 1 4 
10 3
4 2 4 2 1 0 1 0 0 0
6 8 2 5 9 1 4 10 3 7 
15 3
4 2 7 5 1 1 1 0 0 0 0 0 0 0 0
8 5 2 9 6 1 10 7 11 4 12 3 13 14 15 
5 1
1 3 2 0 0
4 1 5 3 2 
8 3
2 0 2 2 1 0 0 0
2 6 7 1 3 8 4 5 
1 1
0
1 
10 10
0 0 0 0 0 0 0 0 0 0
1 2 3 4 5 6 7 8 9 10 
10 9
1 0 0 0 0 0 0 0 0 0
2 3 4 5 6 7 8 9 10 1 
10 1
9 8 7 6 5 4 3 2 1 0
10 9 8 7 6 5 4 3 2 1 
10 1
7 6 5 4 3 2 1 0 0 0
8 7 6 5 4 3 2 1 9 10 
13 2
1 2 3 4 5 4 3 2 1 0 0 0 0
10 1 11 2 8 3 9 4 6 7 5 12 13 
2 2
0 0
1 2 
2 1
1 0
2 1 
2 1
0 0
1 2 
3 1
2 1 0
3 2 1 
5 1
4 3 2 1 0
5 4 3 2 1 
5 4
1 0 0 0 0
2 3 4 5 1 
20 4
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0
17 1 2 3 4 5 6 7 8 9 10 11 12 13 18 14 19 15 20 16 
20 2
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0
19 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 20 18 
20 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 
20 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0
18 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 19 20 
10 1
1 1 1 1 1 1 1 1 1 0
10 1 2 3 4 5 6 7 8 9 
130 32
72 56 81 71 45 17 65 13 87 22 17 75 72 80 68 76 62 35 14 53 49 72 19 55 10 57 28 35 66 59 45 24 37 65 46 31 34 1 30 12 37 13 40 41 39 6 31 28 30 0 2 7 23 32 0 34 21 0 23 3 18 33 7 6 20 19 21 10 27 28 19 23 5 15 22 13 14 1 3 14 0 5 1 14 0 0 7 11 10 1 1 1 6 5 3 3 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
50 55 58 81 38 85 86 51 97 99 100 46 60 101 8 102 25 52 103 6 19 64 11 104 63 105 106 40 107 10 42 108 23 109 68 73 110 78 111 112 113 79 32 114 115 27 61 83 18 116 117 65 66 118 28 53 5 57 82 119 36 39 67 120 48 59 74 76 2 33 121 37 71 122 21 47 49 77 90 41 123 20 31 91 124 7 92 125 43 1 4 45 54 80 17 24 35 44 87 126 72 26 127 15 69 3 128 13 56 75 12 129 70 30 84 95 62 16 130 88 14 22 89 29 93 9 94 96 98 34 
#  =========     /\       /|    |====/|
#      |        /  \       |    |   / |
#      |       /____\      |    |  /  |
#      |      /      \     |    | /   |
#  ========= /        \  =====  |/====|  
#  code

def main():
    n,k = map(int,input().split())
    a = list(map(int,input().split()))
    b = [0]*n
    for i in range(n):
        l = -1
        for j in range(n):
            if a[j] == 0:
                l = j
                b[i] = j + 1
                a[j] -= 1
                break
        for j in range(n):
            if l >= j + k:
                a[j] -= 1
    print(*b)
    return

if __name__ == "__main__":
    main()