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