#include <bits/stdc++.h>
using namespace std;
int n, k, mark[100010] = {0};
int main() {
  scanf("%d%d", &n, &k);
  int l = 1, r = n + n;
  if (k != 0) {
    printf("%d %d ", 1, 1 + k);
    mark[1] = mark[1 + k] = 1;
    l++;
  }
  while (l <= r) {
    while (mark[l]) l++;
    while (mark[r]) r++;
    if (l == r)
      printf("%d", l);
    else if (l < r) {
      printf("%d %d ", r, l);
      mark[r] = mark[l] = 1;
    }
    r--;
    l++;
  }
  return 0;
}
