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