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.*;
import java.math.*;
import java.util.*;

import static java.lang.Math.*;

public class ManB {
	
	static InputStreamReader inp = new InputStreamReader(System.in);
	static BufferedReader in = new BufferedReader(inp);
	static boolean test = false;

	public String str() throws IOException {
		return in.readLine();
	}

	public static void main(String[] args) throws Throwable {
		if (test) {
			in = new BufferedReader(new FileReader(new File("testdata.txt")));
		}

		new ManB().solve();
	}

	private int[] ints() throws Throwable {
		StringTokenizer st = new StringTokenizer(str());
		
		int[] res = new int[st.countTokens()];
		for (int i = 0; i < res.length; i++) {
			res[i] = Integer.parseInt(st.nextToken());
		}
		return res;
	}

	private long[] longs() throws Throwable {
		StringTokenizer st = new StringTokenizer(str());
		
		long[] res = new long[st.countTokens()];
		for (int i = 0; i < res.length; i++) {
			res[i] = Long.parseLong(st.nextToken());
		}
		return res;
	}

	private BigInteger[] bigs() throws Throwable {
		StringTokenizer st = new StringTokenizer(str());
		
		BigInteger[] res = new BigInteger[st.countTokens()];
		for (int i = 0; i < res.length; i++) {
			res[i] = new BigInteger(st.nextToken());
		}
		return res;
	}

	private int in() throws NumberFormatException, IOException {
		return Integer.parseInt(str());
	}
	
	private void solve() throws Throwable {
		int[] x = ints();
		int n = x[0];
		int k = x[1];
		int[] b = ints();
		int[] a = new int[n];
		
		for (int i = 0; i < a.length; i++) {
			a[i] = 1 + i;
		}
		
		for (int i = a.length - 1; i >= 0; i--) {
			int startPos = 0; 
			for (int j = 0; j < a.length; j++) {
				if(a[j] == i +1 ){
					startPos = j;
					break;
				}
			}
			
			int endpos = startPos;
			int hits = 0;
			int targetVal = i + k + 1;
			BitSet bits = new BitSet();
			for (int j = startPos + 1; j < a.length && hits < b[i]; j++) {
				int val = a[j];
				if(val >= targetVal){
					hits ++;
					endpos = j;
					bits.set(j);
				}
			}
			int start = startPos;
			int lastbit = -1;
			for (int j = 0; j < bits.cardinality(); j++) {
				lastbit = bits.nextSetBit(lastbit+1);
				
				int tmp = a[start];
				
				
				for (int id = start; id < lastbit; id++) {
					a[id] = a[id+1];
				}
				a[lastbit]  = tmp;
//				a[start] = tmp;
				start = lastbit;
			}
			
//			int tmp = a[endpos];
//			a[endpos]  = a[startPos];
////			for (int j = endpos - 1; j >= startPos; j--) {
////				a[j+1] = a[j];
////			}
//			a[startPos] = tmp;
		}
		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < a.length; i++) {
			sb.append(a[i]);
			if(i < a.length -1 ){
				sb.append(" ");
			}
		}
		System.out.println(sb.toString());
		
	}
}