#include <bits/stdc++.h>
using namespace std;
const int mxn = 1024;
int n, k;
int a[mxn];
int main(int argc, char** argv) {
  scanf("%d", &n);
  scanf("%d", &k);
  priority_queue<int, vector<int>, greater<int> > q;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] == 0) {
      q.push(i);
    }
  }
  int printed = 0;
  while (q.size() > 0) {
    int z = q.top();
    q.pop();
    printf("%d", z);
    if (++printed == n) {
      puts("");
    } else {
      printf(" ");
    }
    int hi = z - k;
    for (int i = 1; i <= hi; i++) {
      if (--a[i] == 0) {
        q.push(i);
      }
    }
  }
  return 0;
}
