#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, ck;
  cin >> n >> k;
  ck = 0;
  for (int i = k + 1; i > 0; i--) {
    cout << i << " ";
    ck++;
  }
  n -= ck;
  for (int i = 0; i < n; i++) {
    cout << i + k + 2 << " ";
  }
  return 0;
}
