#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  {
    long long a, b, c, d, i, j, k, l, m, n, sum = 0, temp = 0, f = 0, cnt = 0;
    cin >> n >> k;
    if (k == 0) {
      for (i = 2 * n; i >= 1; i--) cout << i << " ";
      return 0;
    }
    k *= 2;
    vector<int> vec;
    for (i = 1; i <= 2 * n; i++)
      if (i != (1 + k / 2) && i != 1) vec.push_back(i);
    a = 0, b = 2 * n - 3;
    while (a <= b) {
      if (a <= b) cout << vec[b] << " ", b--;
      if (a <= b) cout << vec[a] << " ", a++;
    }
    cout << 1 << " " << 1 + k / 2 << endl;
  }
}
