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;
long long int max(long long int a, long long int b) {
  if (a > b)
    return a;
  else
    return b;
}
long long int min(long long int a, long long int b) {
  if (a < b)
    return a;
  else
    return b;
}
const int dx[4] = {-1, 1, 0, 0};
const int dy[4] = {0, 0, -1, 1};
int XX[] = {-1, -1, -1, 0, 0, 1, 1, 1};
int YY[] = {-1, 0, 1, -1, 1, -1, 0, 1};
set<long long int> s[10];
bool compare1(pair<long long int, long long int>& a,
              pair<long long int, long long int>& b) {
  if (a.first != b.first) return a.first < b.first;
  return a.second > b.second;
}
bool compare2(pair<long long int, long long int>& a,
              pair<long long int, long long int>& b) {
  if (a.first != b.first) return a.first < b.first;
  return a.second < b.second;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long int n, i, j, x, k, y, m, w, h, c, l, b, f, T, a, t, u, v, r, A, B;
  cin >> n >> k;
  long long int arr[n + 1];
  vector<long long int> vec;
  set<long long int> s;
  for (i = 1; i <= n; i++) {
    cin >> arr[i];
    if (arr[i] == 0) {
      vec.push_back(i);
      s.insert(i);
    }
  }
  for (i = n; i >= 1; i--) {
    if (s.find(i) == s.end()) {
      long long int val = i + k;
      long long int count = 0;
      for (j = 0; j < vec.size(); j++) {
        if (count == arr[i]) break;
        if (vec[j] >= val) {
          count++;
        }
      }
      while (j < vec.size() && vec[j] < i) j++;
      vec.insert(vec.begin() + j, i);
    }
  }
  for (i = 1; i <= n; i++) {
    long long int ind;
    long long int count = 0;
    long long int val = i + k;
    for (j = 0; j < vec.size(); j++) {
      if (vec[j] == i) {
        ind = j;
        break;
      }
    }
    for (j = 0; j < vec.size(); j++) {
      if (count == arr[i]) break;
      if (vec[j] >= val) count++;
    }
    while (j < ind && vec[j] < vec[ind]) {
      j++;
    }
    if (j < ind) {
      for (l = ind; l > j; l--) {
        vec[l] = vec[l - 1];
      }
      vec[j] = i;
    }
  }
  for (j = 0; j < vec.size(); j++) {
    cout << vec[j] << " ";
  }
}
