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 
#include <bits/stdc++.h>
using namespace std;
int dx4[4] = {0, -1, 0, 1};
int dy4[4] = {1, 0, -1, 0};
int dx8[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
int dy8[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
int Power(int base, int exp) {
  int ans = 1;
  while (exp > 0) {
    if (exp & 1) ans = (1LL * ans * base) % 1000000007;
    exp = exp >> 1;
    base = (1LL * base * base) % 1000000007;
  }
  return ans;
}
void input() {
  int n, k;
  cin >> n >> k;
  vector<int> a, b(n), vis(n + 1, 0);
  for (int i = 0; i < n; i += 1) cin >> b[i];
  for (int ii = 0; ii < n; ii += 1) {
    vector<int> cnt(1005, 0);
    for (int i = 0; i < (int)a.size(); i += 1) cnt[a[i]]++;
    for (int i = 0; i < 1005; i += 1)
      if (i) cnt[i] += cnt[i - 1];
    for (int i = 1; i < n + 1; i += 1) {
      if (vis[i]) continue;
      int j = min(1004, i + k);
      int bb = cnt[1004] - cnt[j - 1];
      if (bb == b[i - 1]) {
        a.push_back(i);
        vis[i] = 1;
        break;
      }
    }
  }
  for (int i = 0; i < n; i += 1) cout << a[i] << ' ';
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int q = 1;
  while (q--) input();
}
