#include <bits/stdc++.h>
using namespace std;
char moves[4] = {'L', 'U', 'R', 'D'};
long long dx[4] = {-1, 0, 1, 0};
long long dy[4] = {0, -1, 0, 1};
const long long N = 1e3 + 1;
bool visited[N];
vector<long long> adj[N];
long long n, k;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (long long i = 1; i < k + 1; i++) {
    cout << 2 * i << " " << 2 * i - 1 << " ";
  }
  for (long long i = 2 * k + 1; i < 2 * n + 1; i++) cout << i << " ";
  return 0;
}
