#include <bits/stdc++.h>
using namespace std;
int n, k;
signed main() {
  scanf("%d%d", &n, &k);
  register int i;
  printf("%d ", k + 1);
  for (i = 1; i <= n * 2; ++i) {
    if (i == k + 1) continue;
    printf("%d ", i);
  }
  return 0;
}
