#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int n, k, m, dd[150000], a[1500000];
int main() {
  scanf("%d %d", &n, &k);
  if (k == 0) {
    for (int i = 1; i <= 2 * n; i++) printf("%d ", i);
    return 0;
  }
  printf("%d %d ", k + 1, 1);
  dd[1] = dd[k + 1] = 1;
  for (int i = 1; i <= 2 * n; i++)
    if (dd[i] == 0) printf("%d ", i);
  return 0;
}
