#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  long long a[n], i;
  for (i = 1; i <= n; i++) {
    a[i - 1] = i;
  }
  sort(a, a + m + 1, greater<long long>());
  for (i = 0; i < n; i++) cout << a[i] << " ";
}
