Let A = {a1, a2, ..., an} be any permutation of the first n natural numbers {1, 2, ..., n}. You are given a positive integer k and another sequence B = {b1, b2, ..., bn}, where bi is the number of elements aj in A to the left of the element at = i such that aj ≥ (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 = {x1, x2, ..., xn} and Y = {y1, y2, ..., yn}, let i-th elements be the first elements such that xi ≠ yi. If xi < yi, then X is lexicographically smaller than Y, while if xi > yi, then X is lexicographically greater than Y.

Given n, k and B, you need to determine the lexicographically smallest A.

Input

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 = {b1, b2, ..., bn}.

Output

Print on a single line n integers of A = {a1, a2, ..., an} such that A is lexicographically minimal. It is guaranteed that the solution exists.

Examples

Input

5 2
1 2 1 0 0


Output

4 1 5 2 3 

Input

4 2
1 0 0 0


Output

2 3 1 4 
import java.io.BufferedInputStream;
import java.util.Arrays;
import java.util.Scanner;

public class RestorePerm {
    public static void main(String[] args) {
        Scanner scn = new Scanner(new BufferedInputStream(System.in));

        int n = scn.nextInt();
        int k = scn.nextInt();

        int[] B = new int[n];
        for(int i = 0; i < n; ++i) {
            B[i] = scn.nextInt();
        }

        solve(n, k, B);
    }

    private static void solve(int n, int k, int[] B) {
        final int[] low = new int[n];
        final int[] high = new int[n];

        for(int i = 0; i < n; ++i) {
            low[i] = i + k + 1;
            high[i] = i + k + B[i];
        }

        int[] res = new int[n];

        int[] bit = new int[n+5];
        boolean[] done = new boolean[n];

        for(int pos = 0; pos < n; ++pos) {
            for(int i = 0; i < n; ++i) {
                if (done[i]) continue;

                if (query(bit, n+1) - query(bit, low[i]-1) == B[i]) {
                    res[pos] = i+1;
                    update(bit, i+1, 1);
                    done[i] = true;
                    break;
                }
            }
        }

        for(int t: res) {
            System.out.print(t + " ");
        }
    }

    private static int query(int[] bit, int x) {
        x = Math.min(x, bit.length - 1);
        int ret = 0;
        while (x > 0) {
            ret += bit[x];
            x -= (x&(-x));
        }
        return ret;
    }

    private static void update(int[] bit, int x, int val) {
        while (x < bit.length) {
            bit[x] += val;
            x += (x&(-x));
        }
    }

    private void solve1(int n, int k, int[] B) {
        final int[] low = new int[n];
        final int[] high = new int[n];

        for(int i = 0; i < n; ++i) {
            low[i] = i + k + 1;
            high[i] = i + k + B[i];
        }

        int[] pos = new int[n];
        int[] at = new int[n];
        Arrays.fill(at, -1);

        for(int i = 0; i < n; ++i) {
            // Place it after the last j, such that j < i and high[j] < i
            int start = -1;
            for(int j = 0; j < i; ++j) {
                if (high[j] < i) {
                    start = Math.max(start, pos[j]);
                }
            }

            int skip = Math.max(0, high[i] - low[i] + 1);

            ++start;
            for(int p = start; p < n; ++p) {
                if (at[p] == -1) {
                    if (skip > 0) {
                        --skip;
                        continue;
                    }
                    at[p] = i;
                    pos[i] = p;
                    break;
                }
            }

            // For all j < i and pos[j] > pos[i] and low[j] > i, update pos[j] = pos[j] + 1
            for(int j = 0; j < i; ++j) {
                if (pos[j] > pos[i] && low[j] > i) {
                    if (at[pos[j]] == j) {
                        at[pos[j]] = -1;
                    }
                    ++pos[j];
                    at[pos[j]] = j;
                }
            }
        }

        int[] res = new int[n];

        for(int i = 0; i < n; ++i) {
            res[pos[i]]=  i+1;
        }

        for(int t: res) {
            System.out.print(t + " ");
        }
    }
}
