#include <bits/stdc++.h>
using namespace std;
queue<int> que;
int n, k;
int main() {
  while (cin >> n >> k) {
    if (k == 0) {
      cout << 1;
      for (int i = 2; i < 2 * n + 1; i++) cout << " " << i;
      cout << endl;
      continue;
    }
    cout << k + 1;
    for (int i = 1; i < 2 * n + 1; i++)
      if (i != k + 1) que.push(i);
    while (!que.empty()) {
      cout << " " << que.front();
      que.pop();
    }
    cout << endl;
  }
  return 0;
}
