#include <iostream>
using namespace std;
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a,b,c;
		cin>>a>>b>>c;
		if(a==b&&b==c){
			cout<<"YES"<<endl;
			cout<<a<<" "<<a<<" "<<a<<endl;
		}
		else if(a==b){
			cout<<"YES"<<endl;
			cout<<a<<" "<<1<<" "<<1<<endl;
		}
		else if(b==c){
			cout<<"YES"<<endl;
			cout<<b<<" "<<1<<" "<<1<<endl;
		}
		else if(a==c){
			cout<<"YES"<<endl;
			cout<<c<<" "<<1<<" "<<1<<endl;
		}
		else{
			cout<<"NO\n";
		}
	}
}


#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a,b,c;
		cin>>a>>b>>c;
		vector <int> list;
		list.push_back(a);
		list.push_back(a-1);
		bool f=0;
		list.push_back(b);
		list.push_back(b-1);
		list.push_back(c);
		list.push_back(c-1);
		for(int i=0;i<6&&!f;i++){
			for(int j=0;j<6&&!f;j++){
				for(int k=0;k<6&&!f;k++){
					if(i!=j&&j!=k&&k!=i){
						if(a==max(list[i],list[j])&&b==max(list[i],list[k])&&c==max(list[k],list[j])){
							f=1;
							cout<<"YES\n";
							cout<<list[i]<<" "<<list[j]<<" "<<list[k]<<endl;
						}
					}
				}
			}
		}
		if(!f){
			cout<<"NO\n";
		}
	}
}


#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a,b,c;
		cin>>a>>b>>c;
		vector <int> list;
		list.push_back(a);
		list.push_back(max(1,a-1));
		bool f=0;
		list.push_back(b);
		list.push_back(max(1,b-1));
		list.push_back(c);
		list.push_back(max(1,c-1));
		for(int i=0;i<6&&!f;i++){
			for(int j=0;j<6&&!f;j++){
				for(int k=0;k<6&&!f;k++){
					if(i!=j&&j!=k&&k!=i){
						if(a==max(list[i],list[j])&&b==max(list[i],list[k])&&c==max(list[k],list[j])){
							f=1;
							cout<<"YES\n";
							cout<<list[i]<<" "<<list[j]<<" "<<list[k]<<endl;
						}
					}
				}
			}
		}
		if(!f){
			cout<<"NO\n";
		}
	}
}


#include <iostream>
using namespace std;
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a,b,c;
		cin>>a>>b>>c;
		if(a==b&&b==c){
			cout<<"YES"<<endl;
			cout<<a<<" "<<a<<" "<<a<<endl;
		}
		else if(a==b){
			cout<<"YES"<<endl;
			cout<<a<<" "<<a<<" "<<c<<endl;
		}
		else if(b==c){
			cout<<"YES"<<endl;
			cout<<b<<" "<<b<<" "<<a<<endl;
		}
		else if(a==c){
			cout<<"YES"<<endl;
			cout<<c<<" "<<a<<" "<<b<<endl;
		}
		else{
			cout<<"NO\n";
		}
	}
}


#include <iostream>
using namespace std;
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a,b,c;
		cin>>a>>b>>c;
		if(a==b&&b==c){
			cout<<"YES"<<endl;
			cout<<a<<" "<<a<<" "<<a<<endl;
		}
		else if(a==b){
			cout<<"YES"<<endl;
			cout<<a<<" "<<c<<" "<<c<<endl;
		}
		else if(b==c){
			cout<<"YES"<<endl;
			cout<<b<<" "<<a<<" "<<a<<endl;
		}
		else if(a==c){
			cout<<"YES"<<endl;
			cout<<c<<" "<<b<<" "<<b<<endl;
		}
		else{
			cout<<"NO\n";
		}
	}
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
   int x,y,z;
   cin>>x>>y>>z;
   int a,b,c=0;
   a=min(x,y);
   b=min(x,z);
   c=min(y,z);

   if(x==max(a,b)&&y==max(c,a)&&z==max(b,c))
   {
   	cout<<"YES"<<endl;
   	cout<<a<<b<<c;
   }

   else
   cout<<"NO";

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	int t;
	cin>>t;
	while(t--)
	{

   int x,y,z;
   cin>>x>>y>>z;
   int a,b,c=0;
   a=min(x,y);
   b=min(x,z);
   c=min(y,z);

   if(x==max(a,b)&&y==max(c,a)&&z==max(b,c))
   {
   	cout<<"YES"<<endl;
   	cout<<a<<b<<c<<endl;
   }

   else
   cout<<"NO"<<endl;

}

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	int t;
	cin>>t;
	while(t--)
	{

   int x,y,z;
   cin>>x>>y>>z;
   int a,b,c=0;
   a=min(x,y);
   b=min(x,z);
   c=min(y,z);

   if(x==max(a,b)&&y==max(c,a)&&z==max(b,c))
   {
   	cout<<"YES"<<endl;
   	cout<<a<<b<<c;
   }

   else
   cout<<"NO";

}

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	int t;
	cin>>t;
	while(t--)
	{

   int x,y,z;
   cin>>x>>y>>z;
   int a,b,c=0;
   a=min(x,y);
   b=min(x,z);
   c=min(y,z);

   if(x==max(a,b)&&y==max(c,a)&&z==max(b,c))
   {
   	cout<<"YES"<<endl;
   	cout<<a<<" "<<b<<" "<<c<<endl;
   }

   else
   cout<<"NO"<<endl;

}

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	int t;
	cin>>t;
	while(t--)
	{

   int x,y,z;
   cin>>x>>y>>z;
   int a,b,c=0;
   a=min(x,y);
   b=min(x,z);
   c=min(y,z);

   if(x==max(a,b)&&y==max(c,a)&&z==max(b,c))
   {
   	cout<<"YES"<<endl;
   	cout<<a<<" "b<<" "c<<endl;
   }

   else
   cout<<"NO"<<endl;

}

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	int t,x,y,z;
	cin>>t;
	for(int i=0; i<t; i++)
	{
		cin>>x>>y>>z;
		if(z==x && z==y)
		{
			cout<<"YES"<<endl;
			cout<<x<<" "<<y<<" "<<z<<endl;
		}
		else if(z==y)
		{
			cout<<"YES"<<endl;
			cout<<x<<" "<<x<<" "<<z<<endl;
		}else cout<<"NO"<<endl;
}
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
	int t,x,y,z;
	cin>>t;
	for(int i=0; i<t; i++)
	{
		cin>>x>>y>>z;
		if(z==x && z==y)
		{
			cout<<"YES"<<endl;
			cout<<x<<" "<<y<<" "<<z;
		}
		 else if(z==y)
		{
			cout<<"NO"<<endl;
		}else if(z==x)
		{
			cout<<"YES"<<endl;
			cout<<x<<" "<<y<<" "<<z;
		}else cout<<"NO"<<endl;
	}
}


#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<iostream>
#include<string>
#include<queue>
#include<map>
#include<cmath>
#include<stack>
#include<algorithm>
#include<functional>
#include<stdarg.h>
using namespace std;
typedef long long LL;

int str[200010];
int main() {
    int n,k,nn,i,t;
    while(~scanf("%d%d",&n,&k)) {
        nn = n*2;
        for(i=1; i<=nn; i++) {
            str[i] = i;
        }
        swap(str[2],str[k+1]);
        if(k > 1 && (k+1)%2 == 0) {
            swap(str[k],str[k+1]);
        }
        swap(str[1],str[2]);

        for(i=1; i<nn; i++) {
            printf("%d ",str[i]);
        }
        printf("%d\n",str[nn]);
    }

    return 0;
}


#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<iostream>
#include<string>
#include<queue>
#include<map>
#include<cmath>
#include<stack>
#include<algorithm>
#include<functional>
#include<stdarg.h>
using namespace std;
typedef long long LL;

int str[100010];
int main() {
    int n,k,nn,i;
    while(~scanf("%d%d",&n,&k)){
        nn = n*2;
        for(i=1;i<=nn;i++){
            str[i] = i;
        }
        if(k==1){
            swap(str[1],str[2]);
        }else if(k>1){
            k += 1;
            str[2] = k;
            str[k] = 2;
            if(k%2 == 1){
                swap(str[k],str[k+1]);
            }
        }

        for(i=1;i<nn;i++){
            printf("%d ",str[i]);
        }
        printf("%d\n",str[nn]);
    }

    return 0;
}


#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<iostream>
#include<string>
#include<queue>
#include<map>
#include<cmath>
#include<stack>
#include<algorithm>
#include<functional>
#include<stdarg.h>
using namespace std;
typedef long long LL;

int str[200010];
int main() {
    int n,k,nn,i,t;
    while(~scanf("%d%d",&n,&k)) {
        nn = n*2;
        for(i=1; i<=nn; i++) {
            str[i] = i;
        }
        k += 1;
        if(k > 2){
            swap(str[2],str[k]);
        }
        if(k%2 == 1) {
            swap(str[k],str[k+1]);
        }
        swap(str[1],str[2]);

        for(i=1; i<nn; i++) {
            printf("%d ",str[i]);
        }
        printf("%d\n",str[nn]);
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int n,k,a[100005];

int main(int argc, char **argv) {
#ifndef ONLINE_JUDGE
	freopen("input.in","r",stdin);
#endif
	scanf("%d%d",&n,&k);
	n *= 2;
	for(int i = 1; i<=n; ++i) a[i] = i;
	for(int i = 1; i<=k; ++i)
		swap(a[i],a[i+1]);
	for(int i = 1; i<=n; ++i)
		printf("%d ",a[i]);
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int n,k,a[100005];

int main(int argc, char **argv) {
#ifndef ONLINE_JUDGE
	freopen("input.in","r",stdin);
#endif
	scanf("%d%d",&n,&k);
	n *= 2;
	for(int i = 1; i<=n; ++i) a[i] = i;
	for(int i = 1; i<=k; ++i)
		swap(a[2*i-1],a[2*i]);
	for(int i = 1; i<=n; ++i)
		printf("%d ",a[i]);
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int n,k,a[100005];

int main(int argc, char **argv) {
#ifndef ONLINE_JUDGE
	freopen("input.in","r",stdin);
#endif
	scanf("%d%d",&n,&k);
	n *= 2;
	for(int i = 1; i<=n; ++i) a[i] = i;
	for(int i = k+1; i>=1; --i)
		printf("%d ",a[i]);
	for(int i = k+2; i<=n; ++i)
		printf("%d ",a[i]);
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int n,k;

int main(int argc, char **argv) {
#ifndef ONLINE_JUDGE
	freopen("input.in","r",stdin);
#endif
	scanf("%d%d",&n,&k);
	n *= 2;
	for(int i = k+k; i>=1; --i)
		printf("%d ",i);
	for(int i = k+k+1; i<=n; ++i)
		printf("%d ",i);
	return 0;
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <queue>
#include <stack>
#include <map>

#define f(i,x,y) for (int i = x; i < y; i++)
#define fd(i,x,y) for(int i = x; i>= y; i--)
#define FOR(it,A) for(typeof A.begin() it = A.begin(); it!=A.end(); it++)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define vint vector<int>
#define ll long long
#define clr(A,x) memset(A, x, sizeof A)
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define fst first
#define snd second
#define ones(x) __builtin_popcount(x)
#define cua(x) (x)*(x)
#define eps (1e-9)
#define oo (1<<30)
#define debug(x) cout <<#x << " = " << x << endl
#define adebug(x,n) cout <<#x<<endl; f(i,0,n)cout<<x[i]<<char(i+1==n?10:32)
#define mdebug(x,m,n) cout <<#x<<endl; f(i,0,m)f(j,0,n)cout<<x[i][j]<<char(j+1==n?10:32)

template<typename T> inline void mini(T &a, T b){ if (b<a) a = b; }
template<typename T> inline void maxi(T &a, T b){ if (b>a) a = b; }
/*
int a[10000];

int main() {
    int n; int m;
    bool flag = false;
    std::cin >> n >> m;
    f(i, 0, m * n) {
        std::cin >> a[i];
        if (a[i] == 1 && (i % m == 0 || (i + 1) % m == 0 || i < m || i >= (n - 1) * m))
            flag = true;
    }
    if (flag)
        std::cout << 2;
    else
        std::cout << 4;
}
*/
int a[100000];
int main() {
    int n, m;

    std::cin >> n >> m;

    f(i, 0, 2 * n){
        a[i + 1] = i + 1;
    }
    if (m == 0) {
        f(i, 1, 2 * n + 1){
            std::cout <<  a[i] << " ";
        }
        return 0;
    }

    for (int i = 1; (i - 1) / 4 < m; i = i + 4) {
        a[i] =  i + 2;
        a[i + 2] = i;
    }

    f(i, 1, 2 * n + 1){
        std::cout << a[i] << " ";
    }
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <queue>
#include <stack>
#include <map>

#define f(i,x,y) for (int i = x; i < y; i++)
#define fd(i,x,y) for(int i = x; i>= y; i--)
#define FOR(it,A) for(typeof A.begin() it = A.begin(); it!=A.end(); it++)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define vint vector<int>
#define ll long long
#define clr(A,x) memset(A, x, sizeof A)
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define fst first
#define snd second
#define ones(x) __builtin_popcount(x)
#define cua(x) (x)*(x)
#define eps (1e-9)
#define oo (1<<30)
#define debug(x) cout <<#x << " = " << x << endl
#define adebug(x,n) cout <<#x<<endl; f(i,0,n)cout<<x[i]<<char(i+1==n?10:32)
#define mdebug(x,m,n) cout <<#x<<endl; f(i,0,m)f(j,0,n)cout<<x[i][j]<<char(j+1==n?10:32)

template<typename T> inline void mini(T &a, T b){ if (b<a) a = b; }
template<typename T> inline void maxi(T &a, T b){ if (b>a) a = b; }
/*
int a[10000];

int main() {
    int n; int m;
    bool flag = false;
    std::cin >> n >> m;
    f(i, 0, m * n) {
        std::cin >> a[i];
        if (a[i] == 1 && (i % m == 0 || (i + 1) % m == 0 || i < m || i >= (n - 1) * m))
            flag = true;
    }
    if (flag)
        std::cout << 2;
    else
        std::cout << 4;
}
*/
int a[100000];
int main() {
    int n, m;

    std::cin >> n >> m;

    f(i, 0, 2 * n){
        a[i + 1] = i + 1;
    }
    if (m == 0) {
        f(i, 1, 2 * n + 1){
            std::cout <<  a[i] << " ";
        }
        return 0;
    }

    for (int i = 1; (i - 1) / 4 <= m; i = i + 4) {
        a[i] =  i + 2;
        a[i + 2] = i;
    }

    f(i, 1, 2 * n + 1){
        std::cout << a[i] << " ";
    }
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <queue>
#include <stack>
#include <map>

#define f(i,x,y) for (int i = x; i < y; i++)
#define fd(i,x,y) for(int i = x; i>= y; i--)
#define FOR(it,A) for(typeof A.begin() it = A.begin(); it!=A.end(); it++)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define vint vector<int>
#define ll long long
#define clr(A,x) memset(A, x, sizeof A)
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define fst first
#define snd second
#define ones(x) __builtin_popcount(x)
#define cua(x) (x)*(x)
#define eps (1e-9)
#define oo (1<<30)
#define debug(x) cout <<#x << " = " << x << endl
#define adebug(x,n) cout <<#x<<endl; f(i,0,n)cout<<x[i]<<char(i+1==n?10:32)
#define mdebug(x,m,n) cout <<#x<<endl; f(i,0,m)f(j,0,n)cout<<x[i][j]<<char(j+1==n?10:32)

template<typename T> inline void mini(T &a, T b){ if (b<a) a = b; }
template<typename T> inline void maxi(T &a, T b){ if (b>a) a = b; }
/*
int a[10000];

int main() {
    int n; int m;
    bool flag = false;
    std::cin >> n >> m;
    f(i, 0, m * n) {
        std::cin >> a[i];
        if (a[i] == 1 && (i % m == 0 || (i + 1) % m == 0))
            flag = true;
    }
    if (flag)
        std::cout << 2;
    else
        std::cout << 4;
}*/

int a[100000];
int main() {
    int n, m;

    std::cin >> n >> m;
    int sum = m;
    f(i, 0, 2 * n){
        a[i] = i + 1;
    }
    if (m == 0) {
        f(i, 0, 2 * n){
            std::cout <<  a[i] << " ";
        }
        return 0;
    }
    while (sum % 2 == 0) {
        sum = sum / 2;
    }
    a[0] = sum + 2;
    a[sum + 1] = 1;

    f(i, 0, 2 * n){
        std::cout << m / sum * a[i] << " ";
    }
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <queue>
#include <stack>
#include <map>

#define f(i,x,y) for (int i = x; i < y; i++)
#define fd(i,x,y) for(int i = x; i>= y; i--)
#define FOR(it,A) for(typeof A.begin() it = A.begin(); it!=A.end(); it++)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define vint vector<int>
#define ll long long
#define clr(A,x) memset(A, x, sizeof A)
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define fst first
#define snd second
#define ones(x) __builtin_popcount(x)
#define cua(x) (x)*(x)
#define eps (1e-9)
#define oo (1<<30)
#define debug(x) cout <<#x << " = " << x << endl
#define adebug(x,n) cout <<#x<<endl; f(i,0,n)cout<<x[i]<<char(i+1==n?10:32)
#define mdebug(x,m,n) cout <<#x<<endl; f(i,0,m)f(j,0,n)cout<<x[i][j]<<char(j+1==n?10:32)

template<typename T> inline void mini(T &a, T b){ if (b<a) a = b; }
template<typename T> inline void maxi(T &a, T b){ if (b>a) a = b; }
/*
int a[10000];

int main() {
    int n; int m;
    bool flag = false;
    std::cin >> n >> m;
    f(i, 0, m * n) {
        std::cin >> a[i];
        if (a[i] == 1 && (i % m == 0 || (i + 1) % m == 0))
            flag = true;
    }
    if (flag)
        std::cout << 2;
    else
        std::cout << 4;
}*/

int a[100000];
int main() {
    int n, m;

    std::cin >> n >> m;

    f(i, 0, 2 * n){
        a[i] = i + 1;
    }
    if (m == 0) {
        f(i, 0, 2 * n){
            std::cout <<  a[i] << " ";
        }
        return 0;
    }

    for (int i = 0; i < m; i = i + 4) {
        a[i] =  i + 3;
        a[i + 2] = i + 1;
    }

    f(i, 0, 2 * n){
        std::cout << a[i] << " ";
    }
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <queue>
#include <stack>
#include <map>

#define f(i,x,y) for (int i = x; i < y; i++)
#define fd(i,x,y) for(int i = x; i>= y; i--)
#define FOR(it,A) for(typeof A.begin() it = A.begin(); it!=A.end(); it++)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define vint vector<int>
#define ll long long
#define clr(A,x) memset(A, x, sizeof A)
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define fst first
#define snd second
#define ones(x) __builtin_popcount(x)
#define cua(x) (x)*(x)
#define eps (1e-9)
#define oo (1<<30)
#define debug(x) cout <<#x << " = " << x << endl
#define adebug(x,n) cout <<#x<<endl; f(i,0,n)cout<<x[i]<<char(i+1==n?10:32)
#define mdebug(x,m,n) cout <<#x<<endl; f(i,0,m)f(j,0,n)cout<<x[i][j]<<char(j+1==n?10:32)

template<typename T> inline void mini(T &a, T b){ if (b<a) a = b; }
template<typename T> inline void maxi(T &a, T b){ if (b>a) a = b; }
/*
int a[10000];

int main() {
    int n; int m;
    bool flag = false;
    std::cin >> n >> m;
    f(i, 0, m * n) {
        std::cin >> a[i];
        if (a[i] == 1 && (i % m == 0 || (i + 1) % m == 0))
            flag = true;
    }
    if (flag)
        std::cout << 2;
    else
        std::cout << 4;
}*/

int a[100000];
int main() {
    int n, m;

    std::cin >> n >> m;

    f(i, 0, 2 * n){
        a[i] = i + 1;
    }
    if (m == 0) {
        f(i, 0, 2 * n){
            std::cout <<  a[i] << " ";
        }
        return 0;
    }

    for (int i = 0; i < m; i++) {
        a[2 * i] =  2 * i + 3;
        a[2 * i + 2] = 2 * i + 1;
    }

    f(i, 0, 2 * n){
        std::cout << a[i] << " ";
    }
}


#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
    long long int i,n,kk;
    scanf("%I64d %I64d",&n,&kk);
    for(i=1;i<=n*2;i+=2)
    {
        if(i<=kk)
            printf("%I64d %I64d ",i+1,i);
        else
            printf("%I64d %I64d ",i,i+1);
    }
    return 0;
}


#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
    int i,n,k;
    scanf("%d %d",&n,&k);
    for(i=1;i<=n*2;i+=2)
    {
        if(i<=k*2)
            printf("%d %d ",i+1,i);
        else
            printf("%d %d ",i,i+1);
    }
    return 0;
}


#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
    int i,j,n,k,a[50010],nn;
    scanf("%d %d",&n,&k);
    nn=n*2;
    k*=2;
    for(i=1;i<=n*2;i++)
    {
        a[i]=i;
    }
    for(i=1;i<=nn;i++)
    {
        if((nn-i)==k)
        {
            a[nn]=i;
            a[i]=nn;
            break;
        }
    }
    for(i=1;i<=nn;i++)
    {
        printf("%d ",a[i]);
    }

    return 0;
}


#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
    long long int i,l,n,k,nn;
    scanf("%lld %lld",&n,&k);
    l=nn=n*2;
    k*=2;
    for(i=1;i<nn;i++)
    {
        if( (nn-i)==k && i<=n)
            l=i  , printf("%I64d ",nn);
        else
            printf("%I64d ",i);
    }
    printf("%I64d ",l);
    return 0;
}


#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
    int i,l,n,k,nn;
    scanf("%d %d",&n,&k);
    l=nn=n*2;
    k*=2;
    for(i=1;i<nn;i++)
    {
        if((nn-i)==k)
            l=i  , printf("%d ",nn);
        else
            printf("%d ",i);
    }
    printf("%d",l);

    return 0;
}


#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
    int i,n,k;
    scanf("%d %d",&n,&k);
    for(i=1;i<=n*2;i+=2)
    {
        if(i<=k)
            printf("%d %d ",i+1,i);
        else
            printf("%d %d ",i,i+1);
    }
    return 0;
}


#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
    long long int i,n,k;
    scanf("%I64d %I64d",&n,&k);
    for(i=1;i<=n*2;i+=2)
    {
        if(i<=k)
            printf("%I64d %I64d ",i+1,i);
        else
            printf("%I64d %I64d ",i,i+1);
    }
    return 0;
}


#include <bits/stdc++.h>
#include <stdio.h>
using namespace std;
typedef long long ll;
#define sf(x) scanf("%d", &x);
#define sf2(x, y) scanf("%d %d", &x, &y);
#define sf3(x, y, z) scanf("%d %d %d", &x, &y, &z);
#define sf4(x, y, z, q) scanf("%d %d %d %d", &x, &y, &z, &q);
#define sf5(x, y, z, q, s) scanf("%d %d %d %d %d", &x, &y, &z, &q, &s);
#define pi 3.1415926536

int main()
{
    int n,k,m = 0;
    cin >> n >> k;
    int a[2*n];
    k = (n/2)+((n-(2*k))/2);
    if(n%2){k = n-k;}
    for(int i = 0;i < n;i++)
    {
        if(k){a[m] = m+2;a[m+1] = m+1;k--;}
        else{a[m] = m+1;a[m+1] = m+2;}
        m += 2;
    }
    cout << a[0];
    for(int i = 1;i < 2*n;i++){cout << " " << a[i];}
    return 0;
}


#include <bits/stdc++.h>
#include <stdio.h>
using namespace std;
typedef long long ll;
#define sf(x) scanf("%d", &x);
#define sf2(x, y) scanf("%d %d", &x, &y);
#define sf3(x, y, z) scanf("%d %d %d", &x, &y, &z);
#define sf4(x, y, z, q) scanf("%d %d %d %d", &x, &y, &z, &q);
#define sf5(x, y, z, q, s) scanf("%d %d %d %d %d", &x, &y, &z, &q, &s);
#define pi 3.1415926536

int main()
{
    int n,k,m = 0;
    cin >> n >> k;
    int a[2*n];
    k = (n/2)+((n-(2*k))/2);
    if(n%2){k++;k = n-k;}
    for(int i = 0;i < n;i++)
    {
        if(k){a[m] = m+2;a[m+1] = m+1;k--;}
        else{a[m] = m+1;a[m+1] = m+2;}
        m += 2;
    }
    cout << a[0];
    for(int i = 1;i < 2*n;i++){cout << " " << a[i];}
    return 0;
}


#include <bits/stdc++.h>
#include <stdio.h>
using namespace std;
typedef long long ll;
#define sf(x) scanf("%d", &x);
#define sf2(x, y) scanf("%d %d", &x, &y);
#define sf3(x, y, z) scanf("%d %d %d", &x, &y, &z);
#define sf4(x, y, z, q) scanf("%d %d %d %d", &x, &y, &z, &q);
#define sf5(x, y, z, q, s) scanf("%d %d %d %d %d", &x, &y, &z, &q, &s);
#define pi 3.1415926536

int main()
{
    int n,k,m = 0;
    cin >> n >> k;
    int a[2*n];
    k = (n/2)+((n-(2*k))/2);
    for(int i = 0;i < n;i++)
    {
        if(k){a[m] = m+2;a[m+1] = m+1;k--;}
        else{a[m] = m+1;a[m+1] = m+2;}
        m += 2;
    }
    cout << a[0];
    for(int i = 1;i < 2*n;i++){cout << " " << a[i];}
    return 0;
}


#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <cmath>
#include <iostream>

using namespace std;

#define maxn 100005

int a[maxn];
int n,k;

__int64 getsum1()
{
    __int64 sum = 0;
    for(int i = 1;i <= n;i++)
    {
        sum += abs(a[2 * i - 1] - a[2 * i]);
    }
    return sum;
}
__int64 getsum2()
{
    __int64 sum = 0;
    for(int i = 1;i <= n;i++)
    {
        sum += (a[2 * i - 1] - a[2 * i]);
    }
    return abs(sum);
}

int main()
{
    cin >> n >> k;
    for(int i = 1;i <= 2 * n;i++)
    {
        if(i % 2)
            a[i] = i + 1;
        else
            a[i] = i - 1;
    }
    for(int i = 1;i <= k;i++)
    {
        int temp = a[2 * k  - 1];
        a[2 * k - 1] = a[2 * k];
        a[2 * k] = temp;
    }
    for(int i = 1;i <= 2 * n;i++)
    {
        cout << a[i];
        if(i != 2 * n)
            cout << " ";
        else
            cout << endl;
    }
    return 0;
}


#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <cmath>
#include <iostream>

using namespace std;

#define maxn 100005

int a[maxn];
int n,k;

__int64 getsum1()
{
    __int64 sum = 0;
    for(int i = 1;i <= n;i++)
    {
        sum += abs(a[2 * i - 1] - a[2 * i]);
    }
    return sum;
}
__int64 getsum2()
{
    __int64 sum = 0;
    for(int i = 1;i <= n;i++)
    {
        sum += (a[2 * i - 1] - a[2 * i]);
    }
    return abs(sum);
}

int main()
{
    cin >> n >> k;
    for(int i = 1;i <= 2 * n;i++)
        a[i] = i;

    do{
        //cout << getsum1() - getsum2() << endl;
        if(getsum1() - getsum2() == 2 * k)
            break;
    }while(next_permutation(a + 1,a + 2 * n + 1));
    for(int i = 1;i <= 2 * n;i++)
    {
        cout << a[i];
        if(i != 2 *n)
            cout << " ";
        else
            cout << endl;
    }
    return 0;
}


#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <cmath>
#include <iostream>

using namespace std;

#define maxn 100005

int a[maxn];
int n,k;

__int64 getsum1()
{
    __int64 sum = 0;
    for(int i = 1;i <= n;i++)
    {
        sum += abs(a[2 * i - 1] - a[2 * i]);
    }
    return sum;
}
__int64 getsum2()
{
    __int64 sum = 0;
    for(int i = 1;i <= n;i++)
    {
        sum += (a[2 * i - 1] - a[2 * i]);
    }
    return abs(sum);
}

int main()
{
    cin >> n >> k;
    for(int i = 1;i <= 2 * n;i++)
    {
        a[i] = i;
    }
    for(int i = 1;i <= k;i++)
    {
        int temp = a[2 * i  - 1];
        a[2 * i - 1] = a[2 * i];
        a[2 * i] = temp;
    }
    for(int i = 1;i <= 2 * n;i++)
    {
        cout << a[i];
        if(i != 2 * n)
            cout << " ";
        else
            cout << endl;
    }
    return 0;
}


#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <cmath>
#include <iostream>

using namespace std;

#define maxn 50005

int a[maxn];
int n,k;

int getsum1()
{
    int sum = 0;
    for(int i = 1;i <= n;i++)
    {
        sum += abs(a[2 * i - 1] - a[2 * i]);
    }
    return sum;
}
int getsum2()
{
    int sum = 0;
    for(int i = 1;i <= n;i++)
    {
        sum += (a[2 * i - 1] - a[2 * i]);
    }
    return abs(sum);
}

int main()
{
    cin >> n >> k;
    for(int i = 1;i <= 2 * n;i++)
        a[i] = i;

    do{
        //cout << getsum1() - getsum2() << endl;
        if(getsum1() - getsum2() == 2 * k)
            break;
    }while(next_permutation(a + 1,a + 2 * n + 1));
    for(int i = 1;i <= 2 * n;i++)
    {
        cout << a[i];
        if(i != 2 *n)
            cout << " ";
        else
            cout << endl;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int x,y,arr[100000],z;
int main(){
cin>>x>>y;
y*=2;
z=x;
for(int i=0;i<(x*2);i++){
    arr[i]=i+1;
}
for(int i=0;i<x;i+=2){
    swap(arr[i],arr[i+1]);
}

if(x%2==1){
    swap(arr[x],arr[x-1]);
    x--;
}
for(int i=0;i<z;i+=2){
    if(x==y){
        break;
    }
    else{
        x--;
        swap(arr[i],arr[i+1]);
    }

}
for(int i=0;i<(z*2);i++){
cout<<arr[i]<<" ";
}
cout<<endl;
}


#include<bits/stdc++.h>
using namespace std;
int x,y,arr[100000],z;
int main(){
cin>>x>>y;
y*=2;
z=x;
for(int i=0;i<(x*2);i++){
    arr[i]=i+1;
}
for(int i=0;i<x;i+=2){
    swap(arr[i],arr[i+1]);
}

if(x%2==1){
    swap(arr[x],arr[x-1]);
    x--;
}
for(int i=0;i<(x-y);i+=2){
    swap(arr[i],arr[i+1]);
}
for(int i=0;i<(z*2);i++){
cout<<arr[i]<<" ";
}
cout<<endl;
}


#include<bits/stdc++.h>
using namespace std;
int x,y,arr[100000],z;
int main(){
cin>>x>>y;
y*=2;
z=x;
for(int i=0;i<(x*2);i++){
    arr[i]=i+1;
}
for(int i=0;i<x;i+=2){
    swap(arr[i],arr[i+1]);
}

if(x%2==1){
    swap(arr[x],arr[x-1]);
    x--;
}
for(int i=0;i<(x-(y*2));i+=2){
    swap(arr[i],arr[i+1]);
}
for(int i=0;i<(z*2);i++){
cout<<arr[i]<<" ";
}
cout<<endl;
}


#include<bits/stdc++.h>
using namespace std;
int x,y,arr[100000],z;
int main(){
cin>>x>>y;
y*=2;
z=x;
for(int i=0;i<(x*2);i++){
    arr[i]=i+1;
}
for(int i=0;i<x;i+=2){
    swap(arr[i],arr[i+1]);
}
if(x%2==1){
    swap(arr[x],arr[x-1]);
    x--;
}
for(int i=0;i<x;i+=2){
    if(x==y){
        break;
    }
    else{
        x--;
        swap(arr[i],arr[i+1]);
    }
}
for(int i=0;i<(z*2);i++){
    cout<<arr[i]<<" ";
}
cout<<endl;
}


#include<iostream>
using namespace std;
int main()
{
    int i,n,k;
    while(cin>>n>>k)
    {
        if(k!=0)
        {
            cout<<1<<" "<<k+1;
           for(i=2*n;i>=4;i-=2)
           cout<<" "<<i<<" "<<i-1;
           cout<<endl;
        }
        else
        {
            cout<<2<<" "<<1;
            for(i=3;i<=2*n;i+=2)
            cout<<" "<<i+1<<" "<<i;
            cout<<endl;
        }
    }
}


#include<iostream>
#include<string>
using namespace std;
int main()
{
    int i,n,k,p[100010];
    while(cin>>n>>k)
    {
        memset(p,0,sizeof(p));
        if(k!=0)
        {
            cout<<1<<" "<<k+1;
            p[1]=1;p[k+1]=1;
           for(i=2*n;i>=1;i--)
           if(!p[i])
           cout<<" "<<i;
           cout<<endl;
        }

        else
        {
            cout<<2<<" "<<1;
            for(i=3;i<=2*n;i+=2)
            cout<<" "<<i+1<<" "<<i;
            cout<<endl;
        }
    }
}


#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
#include <algorithm>
using namespace std;

int data[100005];

int main()
{
	int n,k;
	while(scanf("%d%d",&n,&k)!=EOF)
	{
		for(int i=1;i<=n*2;i++) data[i]=i;
		for(int i=1;i<=k;i+=2)
		{
			data[i]++;
			data[i+1]--;
		}
		for(int i=1;i<=n*2-1;i++) printf("%d ",data[i]);
		printf("%d\n",data[n*2]);
	}
	return 0;
}


#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
#include <algorithm>
using namespace std;

int data[100005];

int main()
{
	int n,k;
	while(scanf("%d%d",&n,&k)!=EOF)
	{
		for(int i=1;i<=n*2;i++) data[i]=i;
		if (k!=0)
		{
			data[2]=k+1;
			data[k+1]=2;
			if (data[1]<data[2])swap(data[1],data[2]);
			if (((k+1)%2==0)&&(k>1)) swap(data[k],data[k-1]);
		}
		for(int i=1;i<=n*2-1;i++) printf("%d ",data[i]);
		printf("%d\n",data[2*n]);
	}
	return 0;
}


#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
#include <algorithm>
using namespace std;

int data[100005];

int max(int a,int b)
{
	return a>b?a:b;
}

int main()
{
	int n,k;
	while(scanf("%d%d",&n,&k)!=EOF)
	{
		data[1]=k+1;
		for(int i=2;i<=(k,2);i++) data[i]=i-1;
		for(int i=max(3,k+1);i<=2*n;i++) data[i]=i;
		for(int i=1;i<=n*2-1;i++) printf("%d ",data[i]);
		printf("%d\n",data[2*n]);
	}
	return 0;
}


#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
#include <algorithm>
using namespace std;

int data[100005];

int main()
{
	int n,k;
	while(scanf("%d%d",&n,&k)!=EOF)
	{
		for(int i=1;i<=n*2;i++) data[i]=i;
		for(int i=1;i<=2*k;i+=2)
		{
			data[i]++;
			data[i+1]--;
		}
		for(int i=1;i<=n*2-1;i++) printf("%d ",data[i]);
		printf("%d\n",data[n*2]);
	}
	return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <string.h>
#define s(n)                        scanf("%d",&n)
#define sc(n)                       scanf("%c",&n)
#define sl(n)                       scanf("%I64d",&n)
#define sf(n)                       scanf("%lf",&n)
#define ss(n)                       scanf("%s",n)
#define INF                         (int)1e9
#define EPS                         1e-9
#define bitcount                    __builtin_popcount
#define gcd                         __gcd
#define forall(i,a,b)               for(int i=a;i<b;i++)
#define foreach(v, c)               for( typeof( (c).begin()) v = (c).begin();  v != (c).end(); ++v)
#define all(a)                      a.begin(), a.end()
#define in(a,b)                     ( (b).find(a) != (b).end())
#define pb                          push_back
#define fill(a,v)                    memset(a, v, sizeof a)
#define sz(a)                       ((int)(a.size()))
#define mp                          make_pair
#define MOD                         1000000007
typedef long long ll;
/*i want to code fast*/
using namespace std;

int main()
{
	int n,k;
	scanf("%d %d",&n,&k);
	n = 2*n;
	k = 2*k;
	for(int i=1;i<n;i+=2)
	{
		if(k)
		{
			printf("%d %d ",i,i+1);
			k-=2;
		}
		else
		{
			printf("%d %d ",i+1,i);
		}
	}
	return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <string.h>
#define s(n)                        scanf("%d",&n)
#define sc(n)                       scanf("%c",&n)
#define sl(n)                       scanf("%I64d",&n)
#define sf(n)                       scanf("%lf",&n)
#define ss(n)                       scanf("%s",n)
#define INF                         (int)1e9
#define EPS                         1e-9
#define bitcount                    __builtin_popcount
#define gcd                         __gcd
#define forall(i,a,b)               for(int i=a;i<b;i++)
#define foreach(v, c)               for( typeof( (c).begin()) v = (c).begin();  v != (c).end(); ++v)
#define all(a)                      a.begin(), a.end()
#define in(a,b)                     ( (b).find(a) != (b).end())
#define pb                          push_back
#define fill(a,v)                    memset(a, v, sizeof a)
#define sz(a)                       ((int)(a.size()))
#define mp                          make_pair
#define MOD                         1000000007
typedef long long ll;
/*For you see , each day i love you
 more.Today more than yesterday
  less than tomorrow.*/
using namespace std;

int main()
{
	int n,k;
	cin>>n>>k;

	printf("%d " , k+1);

	for(int i=1;i<k+1;i++) printf("%d " , i);

	for(int i = k+2;i<=2*n;i++) printf("%d " , i);

	printf("\n");
	return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <string.h>
#define s(n)                        scanf("%d",&n)
#define sc(n)                       scanf("%c",&n)
#define sl(n)                       scanf("%I64d",&n)
#define sf(n)                       scanf("%lf",&n)
#define ss(n)                       scanf("%s",n)
#define INF                         (int)1e9
#define EPS                         1e-9
#define bitcount                    __builtin_popcount
#define gcd                         __gcd
#define forall(i,a,b)               for(int i=a;i<b;i++)
#define foreach(v, c)               for( typeof( (c).begin()) v = (c).begin();  v != (c).end(); ++v)
#define all(a)                      a.begin(), a.end()
#define in(a,b)                     ( (b).find(a) != (b).end())
#define pb                          push_back
#define fill(a,v)                    memset(a, v, sizeof a)
#define sz(a)                       ((int)(a.size()))
#define mp                          make_pair
#define MOD                         1000000007
typedef long long ll;
/*For you see , each day i love you
 more.Today more than yesterday
  less than tomorrow.*/
using namespace std;

int main()
{
	int n,k;
	cin>>n>>k;

	for(int i = k+1;i>=1;i--)
	{
		printf("%d " , i);
	}

	for(int i = k+2;i<=2*n;i++)
	{
		printf("%d " , i);
	}

	printf("\n");
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,k,i;
	cin>>n>>k;
	for(i=1;i<=2*k;i+=2)
		cout<<i+1<<" "<<i<<" ";
	for(i=2*k+1;i<=2*n;i++)
		cout<<i<<" ";
}


#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define pi 3.14159265358979323846
const ll INF=1<<28;
#define MOD 1000000007
using namespace std;

ll POWER(ll base,ll expo)
{
    ll num=1;
    ll i=expo;
    while(i)
    {
        num=num*base;
        i--;
    }
    return num;
}
int main()
{
    ll t=1; //cin>>t;
    while(t--)
    {
        ll n,k; cin>>n>>k;
        for(ll i=1;i<=k;i+=2)
           cout<<2*i-1<<" "<<2*i<<" ";
        for(ll i=k+1;i<=n;i++)
            cout<<2*i<<" "<<2*i-1<<" ";
    }
    return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define pi 3.14159265358979323846
const ll INF=1<<28;
#define MOD 1000000007
using namespace std;

ll POWER(ll base,ll expo)
{
    ll num=1;
    ll i=expo;
    while(i)
    {
        num=num*base;
        i--;
    }
    return num;
}
int main()
{
    ll t=1; //cin>>t;
    while(t--)
    {
        ll n,k; cin>>n>>k;
        for(ll i=1;i<=k;i+=2)
           cout<<2*i<<" "<<2*i-1<<" ";
        for(ll i=k+1;i<=n;i++)
            cout<<2*i-1<<" "<<2*i<<" ";
    }
    return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define pi 3.14159265358979323846
const ll INF=1<<28;
#define MOD 1000000007
using namespace std;

ll POWER(ll base,ll expo)
{
    ll num=1;
    ll i=expo;
    while(i)
    {
        num=num*base;
        i--;
    }
    return num;
}
int main()
{
    ll t=1; //cin>>t;
    while(t--)
    {
        ll n,k; cin>>n>>k;
        for(ll i=1;i<=k;i+=2)
           cout<<2*i<<" "<<2*i-1<<" ";
        for(ll i=2*k+1;i<=2*n;i++)
            cout<<i<<" ";
    }
    return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define fastio ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define EN '\n'
#define vc vector
#define eps 0.0000000001
#define pr pair <ll,ll>
#define inf 1e15
#define m(a , b) (a + b) / 2
using namespace std;
ll a[100002];
void sw(ll &n , ll &m){
    ll k = n;
    n = m;
    m = k;
}
int main(){
    ll n , k;
    cin >> n >> k;
    for (ll i = 1 ; i <= 2 * n ; i++)
        a[i] = i;
    for (ll i = 1 ; i <= k ; i+= 2){
        sw(a[i] , a[i+1]);
    }
    for (ll i = 1 ; i <= 2 * n ; i++)
        cout << a[i] << " " ;
    return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define fastio ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define EN '\n'
#define vc vector
#define eps 0.0000000001
#define pr pair <ll,ll>
#define inf 1e15
#define m(a , b) (a + b) / 2
using namespace std;
ll a[100002];
void sw(ll &n , ll &m){
    ll k = n;
    n = m;
    m = k;
}
int main(){
    ll n , k;
    cin >> n >> k;
    for (ll i = 1 ; i <= 2 * n ; i++)
        a[i] = i;
    for (ll i = 1 ; i <= 2 * k ; i+= 2){
        sw(a[i] , a[i+1]);
    }
    for (ll i = 1 ; i <= 2 * n ; i++)
        cout << a[i] << " " ;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
const int N =1e5+3;
int a[N];
void setA(int n)
{
    for(int i=1; i<=n; i++)
    {
        a[i]=i;
    }
}
int main()
{
    int n,m,i,j;
    scanf("%d %d",&n,&m);
    if(m==0)
    {
        for(i=n*2; i>=1; i--)
            printf("%d ",i);
        return 0;
    }
    setA(n*2);
    if(m%4==0)
    {
        for(i=n*2; i>=1; i-=2)
        {
            if(i%2==1)
            {
                if(i==m+1)
                    printf("1 ");
                else if(i<=m)
                    printf("%d ",a[i+2]);
                else
                    printf("%d ",a[i]);
            }
            else
                printf("%d ",a[i]);
        }
    }
    else
    {
        int x=m/2;
        x+=2;
        swap(a[x],a[1]);
        for(i=n*2; i>=1; i--)
            printf("%d ",a[i]);
    }
}


#include<bits/stdc++.h>
using namespace std;
const int N =1e5+3;
int a[N];
void setA()
{
    for(int i=1; i<=N; i++)
    {
        a[i]=i;
    }
}
int main()
{
    int n,m,i,j;
    scanf("%d %d",&n,&m);
    if(m==0)
    {
        for(i=n*2; i>=1; i--)
            printf("%d ",i);
        return 0;
    }
    setA();
    if((m*2)%4==0)
    {
        m*=2;
        for(i=n*2; i>=1; i--)
        {
            if(i%2==1)
            {
                if(i==m+1)
                    printf("1 ");
                else if(i<=m)
                    printf("%d ",a[i+2]);
                else
                    printf("%d ",a[i]);
            }
            else
                printf("%d ",a[i]);
        }
    }
    else
    {
        int x=m;
        x+=2;
        swap(a[x],a[1]);
        for(i=n*2; i>=1; i--)
            printf("%d ",a[i]);
    }
}


#include<bits/stdc++.h>
using namespace std;
const int N =5e4+3;
int a[N];
void setA(int n)
{
    for(int i=1; i<=n; i++)
    {
        a[i]=i;
    }
}
int main()
{
    int n,m,i,j;
    scanf("%d %d",&n,&m);
    if(m==0)
    {
        for(i=n*2; i>=1; i--)
            printf("%d ",i);
        return 0;
    }
    setA(n*2);
    if(m%4==0)
    {
        for(i=n*2; i>=1; i-=2)
        {
            if(i%2==1)
            {
                if(i==m+1)
                    printf("1 ");
                else if(i<=m)
                    printf("%d ",a[i+2]);
                else
                    printf("%d ",a[i]);
            }
            else
                printf("%d ",a[i]);
        }
    }
    else
    {
        int x=m/2;
        x+=2;
        swap(a[x],a[1]);
        for(i=n*2; i>=1; i--)
            printf("%d ",a[i]);
    }
}


#include<bits/stdc++.h>
using namespace std;
const int N =1e5+3;
int a[N];
void setA()
{
    for(int i=1; i<=N; i++)
    {
        a[i]=i;
    }
}
int main()
{
    int n,m,i,j;
    scanf("%d %d",&n,&m);
    if(m==0)
    {
        for(i=n*2; i>=1; i--)
            printf("%d ",i);
        return 0;
    }
    setA();
    if((m*2)%4==0)
    {
        for(i=n*2; i>=1; i--)
        {
            if(i%2==1)
            {
                if(i==m+1)
                    printf("1 ");
                else if(i<=m)
                    printf("%d ",a[i+2]);
                else
                    printf("%d ",a[i]);
            }
            else
                printf("%d ",a[i]);
        }
    }
    else
    {
        int x=m;
        x+=2;
        swap(a[x],a[1]);
        for(i=n*2; i>=1; i--)
            printf("%d ",a[i]);
    }
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll ;
int main()
{
    int n , k ;
    cin >> n >> k ;
    vector<int> ans ;
    for(int i = 1 ; i <= 2*n ; i+=2)
    {
        ans.push_back(i+1);
        ans.push_back(i);
    }
    for(int i = 0 ; i < ans.size() ; i++)
        cout << ans[i] << " " ;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    int n , k ;
    cin >> n >> k ;
    bool vis[2*n+5] ;
    memset(vis,0,sizeof(vis));
    vector<int> vec;
    bool even = 1 ;
    if(k == 0)
    {
        for(int i = 1 ; i <= 2*n ; i++)
            cout << i << " " ;
        return 0;
    }
    for(int i = 1 ; vec.size() < 2*n ; i++)
    {
        if(!vis[i] && even)
        {
            vec.push_back(i) , vec.push_back(i+k);
            even = !even;
            vis[i+k] = 1;
        }
        else if(!vis[i])
        {
            vec.push_back(i+k) , vec.push_back(i);
            vis[i+k ] = 1;
            even = !even;
        }
    }
    for(int i =  0 ;i < vec.size() ; i++)
        cout << vec[i] << " " ;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    int n , k ;
    cin >> n >> k ;
    vector<int> ans ;
    for(int i = 1 ; i <= 2*n ; i++)
        ans.push_back(i);
    int p = 2*n ;
    for(int i = 0 ; i < ans.size() && p > 2*k ; i+=2 , p-=2)
    {
        swap(ans[i],ans[i+1]);
    }
    for(int i = 0 ; i < ans.size() ; i++)
        cout << ans[i] << " " ;
}


///*Bismillahir Rahmanir Rahim***///
/***Stay_Home_Stay_Safe***/
///**Author Thasin Sheikh**///
#include<bits/stdc++.h>
using namespace std;
#define MAX 1e6+10
#define MOD 1000000007
#define PI 3.14159265359
#define makefast__  ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using ll=long long int  ;
using dl =double;
using ull=unsigned long long;
const int N = 2e5 + 10;
ll aarray[N];
ll magic[505][505];
vector<ll>primes;
bool ok[1000001];
int main()
{
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    makefast__
    string str;
    ll i,j,n,m,k,t;
    cin>>n>>k;
    for(i=1;i<=2*n;i++)
    {
        aarray[i]=i;
    }
    for(i=1,j=1;i<=k;i++,j+=2)
    {
        swap(aarray[j],aarray[j+1]);
    }
    for(i=1;i<=2*n;i++)
    {
        cout<<aarray[i]<<" ";
    }
    cout<<"\n";
    return 0;
}


///*Bismillahir Rahmanir Rahim***///
/***Stay_Home_Stay_Safe***/
///**Author Thasin Sheikh**///
#include<bits/stdc++.h>
using namespace std;
#define MAX 1e6+10
#define MOD 1000000007
#define PI 3.14159265359
#define makefast__  ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using ll=long long int  ;
using dl =double;
using ull=unsigned long long;
const int N = 2e5 + 10;
ll aarray[N];
ll magic[505][505];
vector<ll>primes;
bool ok[1000001];
int main()
{
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    makefast__
    string str;
    ll i,j,n,m,k,t;
    cin>>n>>k;
    if(k==0)
    {
        for(i=1;i<=2*n;i++)
        {
            cout<<i<<" ";
        }
        cout<<"\n";
        return 0;
    }
    n=2*n;
    ll d=n-2;
    ll d2;
    d/=2;
    d2=d;
    vector<ll>v;
    ll p=n-1;
    while(d--)
    {
        v.push_back(abs(p));
        p-=k;
    }
    v.push_back(2);
    v.push_back(1);
    p=abs(p);
    p+=k+1;
    while(d2--)
    {
        v.push_back(p);
        p+=k;
    }
    for(auto c:v)
    {
        cout<<c<<" ";
    }
    cout<<endl;
    return 0;
}


///*Bismillahir Rahmanir Rahim***///
/***Stay_Home_Stay_Safe***/
///**Author Thasin Sheikh**///
#include<bits/stdc++.h>
using namespace std;
#define MAX 1e6+10
#define MOD 1000000007
#define PI 3.14159265359
#define makefast__  ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using ll=long long int  ;
using dl =double;
using ull=unsigned long long;
const int N = 2e5 + 10;
ll aarray[N];
ll magic[505][505];
vector<ll>primes;
bool ok[1000001];
int main()
{
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    makefast__
    string str;
    ll i,j,n,m,k,t;
    cin>>n>>k;
    if(k==0)
    {
        for(i=1;i<=2*n;i++)
        {
            cout<<i<<" ";
        }
        cout<<"\n";
        return 0;
    }
    n=2*n;
    ll d=n-2;
    ll d2;
    d/=2;
    d2=d;
    vector<ll>v,v1;
    ll p=n-1;
    while(d--)
    {
        v.push_back(abs(p));
        p-=k;
    }
    v.push_back(2);
    v.push_back(1);
    p=n;
    while(d2--)
    {
        v1.push_back(p);
        p-=k;
    }
    for(i=0;i<v1.size();i++)
    {
        v.push_back(v1[i]);
    }
    for(auto c:v)
    {
        cout<<c<<" ";
    }
    cout<<endl;
    return 0;
}


///*Bismillahir Rahmanir Rahim***///
/***Stay_Home_Stay_Safe***/
///**Author Thasin Sheikh**///
#include<bits/stdc++.h>
using namespace std;
#define MAX 1e6+10
#define MOD 1000000007
#define PI 3.14159265359
#define makefast__  ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using ll=long long int  ;
using dl =double;
using ull=unsigned long long;
const int N = 2e5 + 10;
ll aarray[N];
ll magic[505][505];
vector<ll>primes;
bool ok[1000001];
int main()
{
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    makefast__
    string str;
    ll i,j,n,m,k,t;
    cin>>n>>k;
    if(k==0)
    {
        for(i=1;i<=2*n;i++)
        {
            cout<<i<<" ";
        }
        cout<<"\n";
        return 0;
    }
    n=2*n;
    ll d=n-2;
    ll d2;
    d/=2;
    d2=d;
    vector<ll>v;
    ll p=n-1;
    while(d--)
    {
        v.push_back(p);
        p-=k;
    }
    v.push_back(2);
    v.push_back(1);
    p+=k+1;
    while(d2--)
    {
        v.push_back(p);
        p+=k;
    }
    for(auto c:v)
    {
        cout<<c<<" ";
    }
    cout<<endl;
    return 0;
}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define FastIO      ios_base::sync_with_stdio(0);cin.tie(0),cout.tie(0)
#define pb          push_back
#define siz         100009
#define inf         1e9+8
#define mp          make_pair
#define rep(i,n)    for(int i=0;i<n;i++)
#define repo(i,m,n) for(int i=m;i<=n;i++)
#define ll          long long
#define pii         pair<int,int >
#define sc(n)       scanf("%d",&n)
#define sc2(m,n)    scanf("%d%d",&m,&n);
#define MOD         1000000007
#define fileout     freopen("output.txt","w",stdout)
#define filein      freopen("input.txt","r",stdin)
#define mem(x,i)    memset(x,i,sizeof x)
#define PI          acos(-1.0)
#define ff          first
#define ss          second
#define all(x)      x.begin(),x.end()
#define Case(t)     for(int ks=1;ks<=t;ks++)
#define MAXN 100004
#define MAXLG 17
using namespace __gnu_pbds;
using namespace std;
template <typename T>  using orderedSet =
    tree<T, null_type, less<T>,
    rb_tree_tag, tree_order_statistics_node_update>;
/*------------------------------Graph Moves----------------------------*/
//const int fx[]={+1,-1,+0,+0};
//const int fy[]={+0,+0,+1,-1};
//const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};   // Kings Move
//const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};  // Kings Move
//const int fx[]={-2, -2, -1, -1,  1,  1,  2,  2};  // Knights Move
//const int fy[]={-1,  1, -2,  2, -2,  2, -1,  1}; // Knights Move
/*---------------------------------------------------------------------*/

int main()
{
    int n,k;
    cin>>n>>k;
    int arr[2*n];
    int i=0,j=1;
    while(i<2*n)
    {
        arr[i]=j;
        arr[i+1]=j+2;
        i+=4;
        j+=4;
    }
    if(arr[2*n-1]%2 && n%2) arr[2*n-1]--;
    i=2;j=2;
    while(i<2*n)
    {
        arr[i]=j;
        arr[i+1]=j+2;
        i+=4;
        j+=4;
    }
    i=0;
    if(k%2) {arr[0]=3;arr[1]=2;arr[2]=1;k--;i=4;}
    while(k)
    {
        swap(arr[i],arr[i+1]);
        k-=2;
        i+=2;
    }
    if(n==1){cout<<1<<' '<<2;return 0;}
    rep(i,2*n) cout<<arr[i]<<' ';

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define FastIO      ios_base::sync_with_stdio(0);cin.tie(0),cout.tie(0)
#define pb          push_back
#define siz         100009
#define inf         1e9+8
#define mp          make_pair
#define rep(i,n)    for(int i=0;i<n;i++)
#define repo(i,m,n) for(int i=m;i<=n;i++)
#define ll          long long
#define pii         pair<int,int >
#define sc(n)       scanf("%d",&n)
#define sc2(m,n)    scanf("%d%d",&m,&n);
#define MOD         1000000007
#define fileout     freopen("output.txt","w",stdout)
#define filein      freopen("input.txt","r",stdin)
#define mem(x,i)    memset(x,i,sizeof x)
#define PI          acos(-1.0)
#define ff          first
#define ss          second
#define all(x)      x.begin(),x.end()
#define Case(t)     for(int ks=1;ks<=t;ks++)
#define MAXN 100004
#define MAXLG 17
using namespace __gnu_pbds;
using namespace std;
template <typename T>  using orderedSet =
    tree<T, null_type, less<T>,
    rb_tree_tag, tree_order_statistics_node_update>;
/*------------------------------Graph Moves----------------------------*/
//const int fx[]={+1,-1,+0,+0};
//const int fy[]={+0,+0,+1,-1};
//const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};   // Kings Move
//const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};  // Kings Move
//const int fx[]={-2, -2, -1, -1,  1,  1,  2,  2};  // Knights Move
//const int fy[]={-1,  1, -2,  2, -2,  2, -1,  1}; // Knights Move
/*---------------------------------------------------------------------*/

int main()
{
    int n,k;
    cin>>n>>k;
    int arr[2*n];
    int i=0,j=1;
    while(i<2*n)
    {
        arr[i]=j;
        arr[i+1]=j+2;
        i+=4;
        j+=4;
    }
    i=2;j=2;
    while(i<2*n)
    {
        arr[i]=j;
        arr[i+1]=j+2;
        i+=4;
        j+=4;
    }
    i=0;
    if(k%2) {arr[0]=3;arr[1]=2;arr[2]=1;k--;}
    while(k)
    {
        swap(arr[i],arr[i+1]);
        k-=2;
        i+=2;
    }
    if(n==1){cout<<1<<' '<<2;return 0;}
    rep(i,2*n) cout<<arr[i]<<' ';

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define FastIO      ios_base::sync_with_stdio(0);cin.tie(0),cout.tie(0)
#define pb          push_back
#define siz         100009
#define inf         1e9+8
#define mp          make_pair
#define rep(i,n)    for(int i=0;i<n;i++)
#define repo(i,m,n) for(int i=m;i<=n;i++)
#define ll          long long
#define pii         pair<int,int >
#define sc(n)       scanf("%d",&n)
#define sc2(m,n)    scanf("%d%d",&m,&n);
#define MOD         1000000007
#define fileout     freopen("output.txt","w",stdout)
#define filein      freopen("input.txt","r",stdin)
#define mem(x,i)    memset(x,i,sizeof x)
#define PI          acos(-1.0)
#define ff          first
#define ss          second
#define all(x)      x.begin(),x.end()
#define Case(t)     for(int ks=1;ks<=t;ks++)
#define MAXN 100004
#define MAXLG 17
using namespace __gnu_pbds;
using namespace std;
template <typename T>  using orderedSet =
    tree<T, null_type, less<T>,
    rb_tree_tag, tree_order_statistics_node_update>;
/*------------------------------Graph Moves----------------------------*/
//const int fx[]={+1,-1,+0,+0};
//const int fy[]={+0,+0,+1,-1};
//const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};   // Kings Move
//const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};  // Kings Move
//const int fx[]={-2, -2, -1, -1,  1,  1,  2,  2};  // Knights Move
//const int fy[]={-1,  1, -2,  2, -2,  2, -1,  1}; // Knights Move
/*---------------------------------------------------------------------*/

int main()
{
    int n,k;
    cin>>n>>k;
    int arr[2*n];
    int i=0,j=1;
    while(i<2*n)
    {
        arr[i]=j;
        arr[i+1]=j+2;
        i+=4;
        j+=4;
    }
    i=2;j=2;
    while(i<2*n)
    {
        arr[i]=j;
        arr[i+1]=j+2;
        i+=4;
        j+=4;
    }

    if(k%2) {arr[0]=3;arr[1]=2;arr[2]=1;k--;i=2;}
    while(k)
    {
        swap(arr[i],arr[i+1]);
        k-=2;
        i+=2;
    }
    if(n==1){cout<<1<<' '<<2;return 0;}
    rep(i,2*n) cout<<arr[i]<<' ';

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define FastIO      ios_base::sync_with_stdio(0);cin.tie(0),cout.tie(0)
#define pb          push_back
#define siz         100009
#define inf         1e9+8
#define mp          make_pair
#define rep(i,n)    for(int i=0;i<n;i++)
#define repo(i,m,n) for(int i=m;i<=n;i++)
#define ll          long long
#define pii         pair<int,int >
#define sc(n)       scanf("%d",&n)
#define sc2(m,n)    scanf("%d%d",&m,&n);
#define MOD         1000000007
#define fileout     freopen("output.txt","w",stdout)
#define filein      freopen("input.txt","r",stdin)
#define mem(x,i)    memset(x,i,sizeof x)
#define PI          acos(-1.0)
#define ff          first
#define ss          second
#define all(x)      x.begin(),x.end()
#define Case(t)     for(int ks=1;ks<=t;ks++)
#define MAXN 100004
#define MAXLG 17
using namespace __gnu_pbds;
using namespace std;
template <typename T>  using orderedSet =
    tree<T, null_type, less<T>,
    rb_tree_tag, tree_order_statistics_node_update>;
/*------------------------------Graph Moves----------------------------*/
//const int fx[]={+1,-1,+0,+0};
//const int fy[]={+0,+0,+1,-1};
//const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};   // Kings Move
//const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};  // Kings Move
//const int fx[]={-2, -2, -1, -1,  1,  1,  2,  2};  // Knights Move
//const int fy[]={-1,  1, -2,  2, -2,  2, -1,  1}; // Knights Move
/*---------------------------------------------------------------------*/

int main()
{
    int n,k;
    cin>>n>>k;
    int arr[2*n];
    int i=0,j=1;
    while(i<2*n)
    {
        arr[i]=j;
        arr[i+1]=j+2;
        i+=4;
        j+=4;
    }
    i=2;j=2;
    while(i<2*n)
    {
        arr[i]=j;
        arr[i+1]=j+2;
        i+=4;
        j+=4;
    }
    i=0;
    if(k%2) {arr[0]=3;arr[1]=2;arr[2]=1;k--;i=2;}
    while(k)
    {
        swap(arr[i],arr[i+1]);
        k-=2;
        i+=2;
    }
    if(n==1){cout<<1<<' '<<2;return 0;}
    rep(i,2*n) cout<<arr[i]<<' ';

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define FastIO      ios_base::sync_with_stdio(0);cin.tie(0),cout.tie(0)
#define pb          push_back
#define siz         100009
#define inf         1e9+8
#define mp          make_pair
#define rep(i,n)    for(int i=0;i<n;i++)
#define repo(i,m,n) for(int i=m;i<=n;i++)
#define ll          long long
#define pii         pair<int,int >
#define sc(n)       scanf("%d",&n)
#define sc2(m,n)    scanf("%d%d",&m,&n);
#define MOD         1000000007
#define fileout     freopen("output.txt","w",stdout)
#define filein      freopen("input.txt","r",stdin)
#define mem(x,i)    memset(x,i,sizeof x)
#define PI          acos(-1.0)
#define ff          first
#define ss          second
#define all(x)      x.begin(),x.end()
#define Case(t)     for(int ks=1;ks<=t;ks++)
#define MAXN 100004
#define MAXLG 17
using namespace __gnu_pbds;
using namespace std;
template <typename T>  using orderedSet =
    tree<T, null_type, less<T>,
    rb_tree_tag, tree_order_statistics_node_update>;
/*------------------------------Graph Moves----------------------------*/
//const int fx[]={+1,-1,+0,+0};
//const int fy[]={+0,+0,+1,-1};
//const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};   // Kings Move
//const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};  // Kings Move
//const int fx[]={-2, -2, -1, -1,  1,  1,  2,  2};  // Knights Move
//const int fy[]={-1,  1, -2,  2, -2,  2, -1,  1}; // Knights Move
/*---------------------------------------------------------------------*/

int main()
{
    int n,k;
    cin>>n>>k;
    int arr[2*n];
    int i=0,j=1;
    while(i<2*n)
    {
        arr[i]=j;
        arr[i+1]=j+2;
        i+=4;
        j+=4;
    }
    i=2;j=2;
    while(i<2*n)
    {
        arr[i]=j;
        arr[i+1]=j+2;
        i+=4;
        j+=4;
    }
    i=0;
    if(k%2) {arr[0]=3;arr[1]=2;arr[2]=1;k--;i=4;}
    while(k)
    {
        swap(arr[i],arr[i+1]);
        k-=2;
        i+=2;
    }
    if(n==1){cout<<1<<' '<<2;return 0;}
    rep(i,2*n) cout<<arr[i]<<' ';

}


#include <bits/stdc++.h>
using namespace std;

int main() {
	int n,k;
	cin>>n>>k;
	int t[2*n];
	for(int i=0;i<2*n;i++){
	    t[i]=i+1;
	    if(i&&i%2&&k>0){
	        swap(t[i],t[i-1]);
	        k--;
	    }
	}
	for(int i=0;i<2*n;i++){
	    cout<<t[i]<<' ';
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
	int n,k;
	cin>>n>>k;
	int t[2*n];
	for(int i=0;i<2*n;i++){
	    t[i]=i+1;
	}
    if(2*k>0){
        swap(t[0],t[2*k]);
    }
	for(int i=0;i<2*n;i++){
	    cout<<t[i]<<' ';
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
	int n,k,v;
	cin>>n>>k;
	v=2*k;
	int t[2*n];
	for(int i=0;i<2*n;i++){
	    t[i]=i+1;
	    if(i&&i%2&&v>0){
	        swap(t[i],t[i-1]);
	        v--;
	    }
	}
	for(int i=0;i<2*n;i++){
	    cout<<t[i]<<' ';
	}
	return 0;
}


// Problem : B. Permutation
// Contest : Codeforces - Codeforces Round #209 (Div. 2)
// URL : https://codeforces.com/problemset/problem/359/B
// Memory Limit : 256 MB
// Time Limit : 1000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")

#include <bits/stdc++.h>
using namespace std;

/* DEBUGGING */
void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}

template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define deb(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define deb(x...)
#endif

/* MACROS */
typedef long long int ll;

typedef pair<int, int> pii;
typedef pair<ll,ll> pll;

typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;

typedef map<int,int> mii;

#define  ff          first
#define  ss          second
#define  pb          push_back
#define  IOS         ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define  lb          lower_bound
#define  ub          upper_bound
#define  all(x)      (x).begin(), (x).end()
#define  lcm(x, y)   ((x) * (y) / __gcd(x, y))
#define  ps(x,y)     fixed<<setprecision(y)<<x
#define  setbit(x)   __builtin_popcountll(x)
#define  rep(i,a,b)  for(int i=a ; i<b ; ++i)
#define  repr(i,a,b) for(int i=a ; i>=b ; --i)

/* CONSTANTS */
#define PI 3.141592653589793
const ll MOD = 1e9 + 7;
const ll INF = 1000000000;
const ll MAX_N = 2e5 + 2;

/* CODE STARTS HERE */

void solve(){
    int n,k; cin >> n >> k;
    vi ans(2*n+1);

    rep(i,1,(2*n)+2) ans[i] = i;
    int curr = (2*n);

    while(k--){
        swap(ans[curr],ans[curr-1]);
        curr-=2;
    }

    rep(i,1,(2*n)+1) cout << ans[i] << " ";
}

int main(){
    IOS;
    solve();
}


// Problem : B. Permutation
// Contest : Codeforces - Codeforces Round #209 (Div. 2)
// URL : https://codeforces.com/problemset/problem/359/B
// Memory Limit : 256 MB
// Time Limit : 1000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")

#include <bits/stdc++.h>
using namespace std;

/* DEBUGGING */
void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}

template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define deb(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define deb(x...)
#endif

/* MACROS */
typedef long long int ll;

typedef pair<int, int> pii;
typedef pair<ll,ll> pll;

typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;

typedef map<int,int> mii;

#define  ff          first
#define  ss          second
#define  pb          push_back
#define  IOS         ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define  lb          lower_bound
#define  ub          upper_bound
#define  all(x)      (x).begin(), (x).end()
#define  lcm(x, y)   ((x) * (y) / __gcd(x, y))
#define  ps(x,y)     fixed<<setprecision(y)<<x
#define  setbit(x)   __builtin_popcountll(x)
#define  rep(i,a,b)  for(int i=a ; i<b ; ++i)
#define  repr(i,a,b) for(int i=a ; i>=b ; --i)

/* CONSTANTS */
#define PI 3.141592653589793
const ll MOD = 1e9 + 7;
const ll INF = 1000000000;
const ll MAX_N = 2e5 + 2;

// #define cerr if(false)cerr
/* CODE STARTS HERE */

void solve(){
    int n,k; cin >> n >> k;
    vi ans(2*n+1);

    rep(i,1,(2*n)+2) ans[i] = i;
    int curr = (2*n);

    while(k--){
        swap(ans[curr],ans[curr-1]);
        curr-=2;
    }

    rep(i,1,(2*n)+1) cout << ans[i] << " ";
}

int main(){
    IOS;
    solve();
}


#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
typedef long long ll;
#define Eps 1e-9

vector <int> v;
int main(int argc, char** argv) {
   // freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n,k;
    cin>>n>>k;

    for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }

    int sum1=0,sum2=0;
    for(int i=1;i<v.size();i++)
    {
        sum1+=abs(v[2*i-2]-v[2*i-1]);
        sum2+=(v[2*i-2]-v[2*i-1]);
    }
    if((sum1+sum2)==2*k)
    {
        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;
        return 0;
    }
    int i=v.size()-1;
    while((sum1+sum2)!=2*k && i>0)
    {
        swap(v[i],v[i-1]);
        for(int i=1;i<v.size();i++)
    {
        sum1+=abs(v[2*i-2]-v[2*i-1]);
        sum2+=(v[2*i-2]-v[2*i-1]);
    }
        i--;
    }
    for(int i=0;i<v.size();i++)
        cout<<v[i]<<" ";
    cout<<endl;

    return 0;
}


#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
typedef long long ll;
#define Eps 1e-9

vector <int> v;
int main(int argc, char** argv) {
    //freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n,k;
    cin>>n>>k;

    for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
    int sum1=0,sum2=0;
    for(int i=1;i<n;i++)
    {
        sum1+=abs(v[2*i-2]-v[2*i-1]);
        sum2+=(v[2*i-2]-v[2*i-1]);
    }
    if((sum1-abs(sum2))==2*k)
   {
        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;
        return 0;

    }
    if(2*k!=n)
    {int j=1;
    while((sum1-abs(sum2))!=2*k && j<=n)
    {
        if(j % 2 != 0) sum2-=v[j-1] - v[j];
        else {sum2 -= v[j] - v[j - 1];
        if(j!=v.size()-1)
        sum1-=(1+abs(v[j]-v[j-1]));
        else
        sum1-=1;}
        swap(v[2*j-1],v[2*j-2]);
        if(j % 2 != 0) sum2+=v[j-1] - v[j];
        else {sum2 += v[j] - v[j - 1];
        sum1+=abs(v[j]-v[j-1]);
        }
        j++;
    }
    for(int i=0;i<v.size();i++)
        cout<<v[i]<<" ";
    cout<<endl;}
    else
    {
        v.clear();
         for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
        for(int i=1;i<v.size()-2&&(i%2!=0) ;i+=4)
        {

            swap(v[i],v[i+2]);
        }

        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;

    }

    return 0;
}


#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
typedef long long ll;
#define Eps 1e-9

vector <int> v;
int main(int argc, char** argv) {
  //  freopen("in.txt", "r", stdin);
//    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n,k;
    cin>>n>>k;

    for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
    int sum1=0,sum2=0;
    for(int i=1;i<n;i++)
    {
        sum1+=abs(v[2*i-2]-v[2*i-1]);
        sum2+=(v[2*i-2]-v[2*i-1]);
    }
    if((sum1-abs(sum2))==2*k)
   {
        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;
        return 0;

    }
    if(2*k!=n)
    {int j=1;
    while((sum1-abs(sum2))!=2*k && j<n)
    {
        if(j % 2 != 0) sum2-=v[j-1] - v[j];
        else {sum2 -= v[j] - v[j - 1];
        if(j!=v.size()-1)
        sum1-=(1+abs(v[j]-v[j-1]));
        else
        sum1-=1;}
        swap(v[2*j-1],v[2*j-2]);
        if(j % 2 != 0) sum2+=v[j-1] - v[j];
        else {sum2 += v[j] - v[j - 1];
        sum1+=abs(v[j]-v[j-1]);
        }
        j++;
    }
    for(int i=0;i<v.size();i++)
        cout<<v[i]<<" ";
    cout<<endl;}
    else
    {
        v.clear();
         for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
        for(int i=1;i<v.size()-2&&(i%2!=0) ;i+=4)
        {

            swap(v[i],v[i+2]);
        }

        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;

    }

    return 0;
}


#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
typedef long long ll;
#define Eps 1e-9

vector <int> v;
int main(int argc, char** argv) {
   // freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n,k;
    cin>>n>>k;

    for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
    int sum1=0,sum2=0;
    for(int i=1;i<n;i++)
    {
        sum1+=abs(v[2*i-2]-v[2*i-1]);
        sum2+=(v[2*i-2]-v[2*i-1]);
    }
    if((sum1-abs(sum2))==2*k)
   {
        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;
        return 0;

    }
    if(2*k!=n)
    {int j=1;
    while((sum1-abs(sum2))!=2*k && j<n)
    {
        if(j % 2 != 0) sum2-=v[j-1] - v[j];
        else {sum2 -= v[j] - v[j - 1];
        if(j!=v.size()-1)
        sum1-=(1+abs(v[j]-v[j-1]));
        else
        sum1-=1;}
        swap(v[2*j],v[2*j-1]);
        if(j % 2 != 0) sum2+=v[j-1] - v[j];
        else {sum2 += v[j] - v[j - 1];
        sum1+=abs(v[j]-v[j-1]);
        }
        j--;
    }
    for(int i=0;i<v.size();i++)
        cout<<v[i]<<" ";
    cout<<endl;}
    else
    {
        v.clear();
         for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
        for(int i=1;i<v.size()-2&&(i%2!=0) ;i+=4)
        {

            swap(v[i],v[i+2]);
        }

        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;

    }

    return 0;
}


#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
typedef long long ll;
#define Eps 1e-9

vector <int> v;
int main(int argc, char** argv) {
  //  freopen("in.txt", "r", stdin);
   //freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n,k;
    cin>>n>>k;

    for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
    int sum1=0,sum2=0;
    for(int i=1;i<n;i++)
    {
        sum1+=abs(v[2*i-2]-v[2*i-1]);
        sum2+=(v[2*i-2]-v[2*i-1]);
    }
    if((sum1-abs(sum2))==2*k)
   {
        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;
        return 0;

    }
    if(2*k!=n)
    {int j=n;
    while((sum1-abs(sum2))!=2*k && j>0)
    {
        /*if(j % 2 != 0) */sum2-=(v[2*j-2] - v[2*j-1]);
       // else {sum2 -= v[j] - v[j - 1];
       //}
        swap(v[2*j-1],v[2*j-2]);
       /* if(j % 2 != 0) */sum2+=(v[2*j-2] - v[2*j-1]);
     //   else {sum2 += v[j] - v[j - 1];

       // }
        j--;
    }
    for(int i=0;i<v.size();i++)
        cout<<v[i]<<" ";
    cout<<endl;}
    else
    {
        v.clear();
         for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
        for(int i=1;i<v.size()-2&&(i%2!=0) ;i+=4)
        {

            swap(v[i],v[i+2]);
        }

        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;

    }

    return 0;
}


#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
typedef long long ll;
#define Eps 1e-9

vector <int> v;
int main(int argc, char** argv) {
    //freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n,k;
    cin>>n>>k;

    for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
    int sum1=0,sum2=0;
    for(int i=1;i<n;i++)
    {
        sum1+=abs(v[2*i-2]-v[2*i-1]);
        sum2+=(v[2*i-2]-v[2*i-1]);
    }
    if((sum1-abs(sum2))==2*k)
   {
        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;
        return 0;

    }
    int sum11=sum1;
    int j=v.size()-1;
    while((sum1-abs(sum2))!=2*k && j>0)
    {
        if(j % 2 != 0) sum2-=v[j-1] - v[j];
        else {sum2 -= v[j] - v[j - 1];
        if(j!=v.size()-1)
        sum1-=(1+abs(v[j]-v[j-1]));
        else
        sum1-=1;}
        swap(v[j],v[j-1]);
        if(j % 2 != 0) sum2+=v[j-1] - v[j];
        else {sum2 += v[j] - v[j - 1];
        sum1+=abs(v[j]-v[j-1]);
        }
        j--;
    }
    for(int i=0;i<v.size();i++)
        cout<<v[i]<<" ";
    cout<<endl;

    return 0;
}


#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
typedef long long ll;
#define Eps 1e-9

vector <int> v;
int main(int argc, char** argv) {
   // freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n,k;
    cin>>n>>k;

    for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
    int sum1=0,sum2=0;
    for(int i=1;i<n;i++)
    {
        sum1+=abs(v[2*i-2]-v[2*i-1]);
        sum2+=(v[2*i-2]-v[2*i-1]);
    }
    if((sum1-abs(sum2))==2*k)
   {
        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;
        return 0;

    }
    int j=v.size()-1;
    while((sum1-abs(sum2))!=2*k && j>0)
    {
        if(j % 2 != 0) sum2-=v[j-1] - v[j];
        else {sum2 -= v[j] - v[j - 1];
        sum1-=1;}
        swap(v[j],v[j-1]);
        if(j % 2 != 0) sum2+=v[j-1] - v[j];
        else {sum2 += v[j] - v[j - 1];
        sum1+=abs(v[j]-v[j-1]);
        }
        j--;
    }
    for(int i=0;i<v.size();i++)
        cout<<v[i]<<" ";
    cout<<endl;

    return 0;
}


#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
typedef long long ll;
#define Eps 1e-9

vector <int> v;
int main(int argc, char** argv) {
  //  freopen("in.txt", "r", stdin);
//    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n,k;
    cin>>n>>k;

    for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
    int sum1=0,sum2=0;
    for(int i=1;i<n;i++)
    {
        sum1+=abs(v[2*i-2]-v[2*i-1]);
        sum2+=(v[2*i-2]-v[2*i-1]);
    }
    if((sum1-abs(sum2))==2*k)
   {
        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;
        return 0;

    }
    int j=v.size()-1;

    while((sum1-abs(sum2))!=2*k && j>0)
    {
        sum1=0;sum2=0;
        if(j % 2 != 0) sum2-=v[j-1] - v[j];
        else sum2 -= v[j] - v[j - 1];
        swap(v[j],v[j-1]);
        if(j % 2 != 0) sum2+=v[j-1] - v[j];
        else sum2 += v[j] - v[j - 1];
        j--;
    }
    for(int i=0;i<v.size();i++)
        cout<<v[i]<<" ";
    cout<<endl;

    return 0;
}


#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
typedef long long ll;
#define Eps 1e-9

vector <int> v;
int main(int argc, char** argv) {
  //  freopen("in.txt", "r", stdin);
//    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n,k;
    cin>>n>>k;

    for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
    int sum1=0,sum2=0;
    for(int i=1;i<n;i++)
    {
        sum1+=abs(v[2*i-2]-v[2*i-1]);
        sum2+=(v[2*i-2]-v[2*i-1]);
    }
    if((sum1-abs(sum2))==2*k)
   {
        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;
        return 0;

    }
    if(2*k!=n)
    {int j=1;
    while((sum1-abs(sum2))!=2*k && j<n)
    {
        if(j % 2 != 0) sum2-=v[j-1] - v[j];
        else {sum2 -= v[j] - v[j - 1];
        if(j!=v.size()-1)
        sum1-=(1+abs(v[j]-v[j-1]));
        else
        sum1-=1;}
        swap(v[2*j],v[2*j-1]);
        if(j % 2 != 0) sum2+=v[j-1] - v[j];
        else {sum2 += v[j] - v[j - 1];
        sum1+=abs(v[j]-v[j-1]);
        }
        j++;
    }
    for(int i=0;i<v.size();i++)
        cout<<v[i]<<" ";
    cout<<endl;}
    else
    {
        v.clear();
         for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
        for(int i=1;i<v.size()-2&&(i%2!=0) ;i+=4)
        {

            swap(v[i],v[i+2]);
        }

        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;

    }

    return 0;
}


#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
typedef long long ll;
#define Eps 1e-9

vector <int> v;
int main(int argc, char** argv) {
   // freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n,k;
    cin>>n>>k;

    for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
    int sum1=0,sum2=0;
    for(int i=1;i<n;i++)
    {
        sum1+=abs(v[2*i-2]-v[2*i-1]);
        sum2+=(v[2*i-2]-v[2*i-1]);
    }
    if((sum1-abs(sum2))==2*k)
   {
        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;
        return 0;

    }
    int sum11=sum1;
    int j=v.size()-1;
    while((sum1-abs(sum2))!=2*k && j>0)
    {
        if(j % 2 != 0) sum2-=v[j-1] - v[j];
        else {sum2 -= v[j] - v[j - 1];
        if(j!=v.size()-1)
        sum1-=(1+abs(v[j]-v[j-1]));}
        swap(v[j],v[j-1]);
        if(j % 2 != 0) sum2+=v[j-1] - v[j];
        else {sum2 += v[j] - v[j - 1];
        sum1+=abs(v[j]-v[j-1]);
        }
        j--;
    }
    for(int i=0;i<v.size();i++)
        cout<<v[i]<<" ";
    cout<<endl;

    return 0;
}


#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
typedef long long ll;
#define Eps 1e-9

vector <int> v;
int main(int argc, char** argv) {
  //  freopen("in.txt", "r", stdin);
//    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n,k;
    cin>>n>>k;

    for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
    int sum1=0,sum2=0;
    for(int i=1;i<n;i++)
    {
        sum1+=abs(v[2*i-2]-v[2*i-1]);
        sum2+=(v[2*i-2]-v[2*i-1]);
    }
    if((sum1-abs(sum2))==2*k)
   {
        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;
        return 0;

    }
    if(2*k!=n)
    {int j=v.size()-1;
    while((sum1-abs(sum2))!=2*k && j>0)
    {
        if(j % 2 != 0) sum2-=v[j-1] - v[j];
        else {sum2 -= v[j] - v[j - 1];
        if(j!=v.size()-1)
        sum1-=(1+abs(v[j]-v[j-1]));
        else
        sum1-=1;}
        swap(v[j],v[j-1]);
        if(j % 2 != 0) sum2+=v[j-1] - v[j];
        else {sum2 += v[j] - v[j - 1];
        sum1+=abs(v[j]-v[j-1]);
        }
        j--;
    }
    for(int i=0;i<v.size();i++)
        cout<<v[i]<<" ";
    cout<<endl;}
    else
    {
        v.clear();
         for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
        for(int i=1;i<v.size()-2&&(i%2!=0) ;i+=4)
        {

            swap(v[i],v[i+2]);
        }

        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;

    }

    return 0;
}


#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
typedef long long ll;
#define Eps 1e-9

vector <int> v;
int main(int argc, char** argv) {
   // freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n,k;
    cin>>n>>k;

    for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
    int sum1=0,sum2=0;
    for(int i=1;i<n;i++)
    {
        sum1+=abs(v[2*i-2]-v[2*i-1]);
        sum2+=(v[2*i-2]-v[2*i-1]);
    }
    if((sum1-abs(sum2))==2*k)
   {
        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;
        return 0;

    }
    int j=v.size()-1;

    while((sum1-abs(sum2))!=2*k && j>0)
    {
        sum1=0;sum2=0;
        sum2-=v[j-1] - v[j];
        swap(v[j],v[j-1]);
        sum2+=v[j-1] - v[j];
        j-=2;
    }
    for(int i=0;i<v.size();i++)
        cout<<v[i]<<" ";
    cout<<endl;

    return 0;
}


#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
typedef long long ll;
#define Eps 1e-9

vector <int> v;
int main(int argc, char** argv) {
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n,k;
    cin>>n>>k;

    for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
    int sum1=0,sum2=0;
    for(int i=1;i<n;i++)
    {
        sum1+=abs(v[2*i-2]-v[2*i-1]);
        sum2+=(v[2*i-2]-v[2*i-1]);
    }
    if((sum1-abs(sum2))==2*k)
   {
        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;
        return 0;

    }
    if(2*k!=n)
    {int j=1;
    while((sum1-abs(sum2))!=2*k && j<=n)
    {
        if(j % 2 != 0) sum2-=v[j-1] - v[j];
        else {sum2 -= v[j] - v[j - 1];
        if(j!=v.size()-1)
        sum1-=(1+abs(v[j]-v[j-1]));
        else
        sum1-=1;}
        swap(v[2*j-1],v[2*j-2]);
        if(j % 2 != 0) sum2+=v[j-1] - v[j];
        else {sum2 += v[j] - v[j - 1];
        sum1+=abs(v[j]-v[j-1]);
        }
        j++;
    }
    for(int i=0;i<v.size();i++)
        cout<<v[i]<<" ";
    cout<<endl;}
    else
    {
        v.clear();
         for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
        for(int i=1;i<v.size()-2&&(i%2!=0) ;i+=4)
        {

            swap(v[i],v[i+2]);
        }

        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;

    }

    return 0;
}


#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
typedef long long ll;
#define Eps 1e-9

vector <int> v;
int main(int argc, char** argv) {
    //freopen("in.txt", "r", stdin);
  //  freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n,k;
    cin>>n>>k;

    for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
    int sum1=0,sum2=0;
    for(int i=1;i<n;i++)
    {
        sum1+=abs(v[2*i-2]-v[2*i-1]);
        sum2+=(v[2*i-2]-v[2*i-1]);
    }
    if((sum1-abs(sum2))==2*k)
   {
        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;
        return 0;

    }
    if(2*k!=n)
    {int j=1;
    while((sum1-abs(sum2))!=2*k && j<=n)
    {
        if(j % 2 != 0) sum2-=v[j-1] - v[j];
        else {sum2 -= v[j] - v[j - 1];
        if(j!=v.size()-1)
        sum1-=(1+abs(v[j]-v[j-1]));
        else
        sum1-=1;}
        swap(v[2*j-1],v[2*j-2]);
        if(j % 2 != 0) sum2+=v[j-1] - v[j];
        else {sum2 += v[j] - v[j - 1];
        sum1+=abs(v[j]-v[j-1]);
        }
        j++;
    }
    for(int i=0;i<v.size();i++)
        cout<<v[i]<<" ";
    cout<<endl;}
    else
    {
        v.clear();
         for(int i=0;i<2*n;i++)
    {
        v.push_back(i+1);
    }
        for(int i=1;i<v.size()-2&&(i%2!=0) ;i+=4)
        {

            swap(v[i],v[i+2]);
        }

        for(int i=0;i<v.size();i++)
            cout<<v[i]<<" ";
        cout<<endl;

    }

    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define vi vector
using namespace std;
set<int> s;
int main(){
    int n,k;
    scanf("%d %d",&n,&k);
    if(k == 0){
        for(int i = 1;i <= 2*n;i++){
            printf("%d ",i);
        }
        return 0;
    }
    for(int i = 1;i <= 2*n;i++){
        s.insert(i);
    }
    bool flag = 0;
    printf("%d %d ",1,1+3*k);
    s.erase(1);
    s.erase(1+3*k);
    printf("%d %d ",*s.begin()+k,*s.begin());
    s.erase(*s.begin()+k);
    s.erase(s.begin());
    for(int i = 3;i <= n;i++){
        printf("%d %d ",*s.begin(),*s.begin()+k);
        s.erase(*s.begin()+k);
        s.erase(s.begin());
    }
}


#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define vi vector
using namespace std;

int main(){
    int n,k;
    scanf("%d %d",&n,&k);
    if(k == 0){
        for(int i = 1;i <= 2*n;i++){
            printf("%d ",i);
        }
        return 0;
    }
    bool flag = 0;
    printf("%d %d ",1,1+3*k);
    ll las = 1+3*k+1;
    for(int i = 2;i <= n;i++){
        if(!flag){
            printf("%d %d ",las+k,las);
            las = las+k+1;
            flag = 1;
        }else{
            printf("%d %d ",las+k,las);
            las = las+k+1;
            flag = 0;
        }
    }
}


#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define vi vector
using namespace std;

int main(){
    int n,k;
    scanf("%d %d",&n,&k);
    if(k == 0){
        for(int i = 1;i <= 2*n;i++){
            printf("%d ",i);
        }
        return 0;
    }
    bool flag = 0;
    printf("%d %d ",1,1+3*k);
    int las = 1+3*k+1;
    for(int i = 2;i <= n;i++){
        if(!flag){
            printf("%d %d ",las+k,las);
            las = las+k+1;
            flag = 1;
        }else{
            printf("%d %d ",las+k,las);
            las = las+k+1;
            flag = 0;
        }
    }
}


#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define vi vector
using namespace std;
set<ll> s;
int main(){
    int n,k;
    scanf("%d %d",&n,&k);
    if(k == 0){
        for(int i = 1;i <= 2*n;i++){
            printf("%d ",i);
        }
        return 0;
    }
    for(int i = 1;i <= 2*n;i++){
        s.insert(i);
    }
    bool flag = 0;
    printf("%d %d ",1,1+3*k);
    s.erase(1);
    s.erase(1+3*k);
    printf("%d %d ",*s.begin()+k,*s.begin());
    s.erase(*s.begin()+k);
    s.erase(s.begin());
    for(int i = 3;i <= n;i++){
        printf("%d %d ",*s.begin(),*s.begin()+k);
        s.erase(*s.begin()+k);
        s.erase(s.begin());
    }
}


#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define vi vector
using namespace std;
set<int> s;
int main(){
    int n,k;
    scanf("%d %d",&n,&k);
    if(k == 0){
        for(int i = 1;i <= 2*n;i++){
            printf("%d ",i);
        }
        return 0;
    }
    for(int i = 1;i <= 2*n;i++){
        s.insert(i);
    }
    bool flag = 0;
    printf("%d %d ",1,1+k);
    s.erase(1);
    s.erase(1+k);
    printf("%d %d ",*s.begin()+k,*s.begin());
    s.erase(*s.begin()+k);
    s.erase(s.begin());
    for(int i = 3;i <= n;i++){
        printf("%d %d ",*s.begin(),*s.begin()+k);
        s.erase(*s.begin()+k);
        s.erase(s.begin());
    }
}


#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define vi vector
using namespace std;
set<int> s;
int main(){
    int n,k;
    scanf("%d %d",&n,&k);
    if(k == 0){
        for(int i = 1;i <= 2*n;i++){
            printf("%d ",i);
        }
        return 0;
    }
    for(int i = 1;i <= 2*n;i++){
        s.insert(i);
    }
    bool flag = 0;
    printf("%d %d ",1,1+k);
    s.erase(1);
    s.erase(1+k);
    printf("%d %d ",*s.begin()+k,*s.begin());
    s.erase(*s.begin()+k);
    s.erase(s.begin());
    for(int i = 3;i <= n;i++){
        printf("%d %d ",*s.begin(),*s.begin()+1);
        s.erase(*s.begin()+1);
        s.erase(s.begin());
    }
}


#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define vi vector
using namespace std;
set<int> s;
int main(){
    int n,k;
    scanf("%d %d",&n,&k);
    if(k == 0){
        for(int i = 1;i <= 2*n;i++){
            printf("%d ",i);
        }
        return 0;
    }
    for(int i = 1;i <= 2*n;i++){
        s.insert(i);
    }
    bool flag = 0;
    printf("%d %d ",1,1+k);
    s.erase(1);
    s.erase(1+k);
    printf("%d %d ",*s.begin()+k,*s.begin());
    s.erase(*s.begin()+k);
    s.erase(s.begin());
    for(int i = 3;i <= n;i++){
        printf("%d ",*s.begin());
        s.erase(*s.begin());
        printf("%d ",*s.begin());
        s.erase(s.begin());
    }
}


/*
    You 're fast, then you 're slow
    Why you call, then you fold
    You building me up
    Till the walls come down
    Yes, then you 're no
    But i'm not letting go
   I 'll be your CONTRADICTION
*/

#include <bits/stdc++.h>

//////////////////////////////////////////
#define y0 sdkfaslhagaklsldk
#define y1 aasdfasdfasdf
#define yn askfhwqriuperikldjk
#define j1 assdgsdgasghsf
#define tm sdfjahlfasfh
#define lr asgasgash

//////////////////////////////////////////
#define task "Test"

#define FOR(i,a,b) for(int i = (a); i <= (b); i ++)
#define MASK(i) (1LL << (i))
#define BIT(x, i) (((x) >> (i)) & 1) // kiểm tra bit thú i của số x
#define SET_ON(x, i) ((x) | MASK(i)) // bật bit thứ i của số x
#define SET_OFF(x, i) ((x) & ~MASK(i)) // tắt bit thứ i của số x
#define all(v) (v).begin(),(v).end()
#define ii pair<int, int>
#define jj pair<int, ii>
#define fi first
#define se second
// #define int long long
using namespace std;
const int INF = (int)1e9;
const int mod = 1e9 + 7;
#define eps 1e-11

///   Đệ nhất đụ ca  -  Lồ Hồng     /////
void IOS() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
}
void FRE() {
    //freopen("E:/MakeTest/Test.txt","r",stdin);
    freopen(task".inp", "r", stdin);
    freopen(task".out", "w", stdout);
}

const int N = 502;

int n, k;
main()
{
    IOS();
    // FRE();

    cin >> n >> k;

    for(int i = 1; i <= k; i ++) {
        cout << n + i << " ";
    }
    for(int i = k + 1; i <= n; i ++) {
        cout << i << " ";
    }
    for(int i = 1; i <= k; i ++) {
        cout << i << " ";
    }
    for(int i = k + 1; i <= n; i ++) {
        cout << n + i << " ";
    }

    return 0;
}
/// Change Dream Magic Dr_Unicorn

/*
──────────────── Chill Bro ───────────
─▄▄▄───────────▄▄▄▄▄▄▄────────────────
█▀░▀█──────▄▀▀▀░░░░░░░▀▀▄▄────────────
█░░░░█───▄▀░░░░░░░░░░░░░░░▀▄───────▄▄▄
█▄░░░▀▄▄▀░░██░░░░░░░░░░░░░░▀█────█▀▀░█
─█░░░░█▀░░░▀░░░░░░░░██░░░░░░▀█─▄█░░░░█
─▀█░░▄█░░░░░░░▄▄▄░░░░▀░░░░░░░███░░░░█▀
──█▄░█░░░░░▄███████▄░░░░░░░░░█▀░░░░▄▀─
──▀█░█░░░░▄██████████░░░░░░░▄█░░░░▄▀──
───███░░░░███████████░░░░░░▄█░░░░█▀───
────█░░░░░██████████▀░░░░░░█░░░░█▀────
────█░░░░░░▀███████▀░░░░░░░█▄▄▄▀──────
────█░░░░░░░░▀▀▀▀░░░░░░░░░░░▀█────────
────█░░░░░░░░░░░░░░░░░░░░░░░░█────────
────█░░░░░░░░░░░░░░░░░░░░░░░░█────────
────█░░░░░░░░░░░░░░░░░░░░░░░░█────────
──────────────────────────────────────
*/


/*
    You 're fast, then you 're slow
    Why you call, then you fold
    You building me up
    Till the walls come down
    Yes, then you 're no
    But i'm not letting go
   I 'll be your CONTRADICTION
*/

#include <bits/stdc++.h>

//////////////////////////////////////////
#define y0 sdkfaslhagaklsldk
#define y1 aasdfasdfasdf
#define yn askfhwqriuperikldjk
#define j1 assdgsdgasghsf
#define tm sdfjahlfasfh
#define lr asgasgash

//////////////////////////////////////////
#define task "Test"

#define FOR(i,a,b) for(int i = (a); i <= (b); i ++)
#define MASK(i) (1LL << (i))
#define BIT(x, i) (((x) >> (i)) & 1) // kiểm tra bit thú i của số x
#define SET_ON(x, i) ((x) | MASK(i)) // bật bit thứ i của số x
#define SET_OFF(x, i) ((x) & ~MASK(i)) // tắt bit thứ i của số x
#define all(v) (v).begin(),(v).end()
#define ii pair<int, int>
#define jj pair<int, ii>
#define fi first
#define se second
// #define int long long
using namespace std;
const int INF = (int)1e9;
const int mod = 1e9 + 7;
#define eps 1e-11

///   Đệ nhất đụ ca  -  Lồ Hồng     /////
void IOS() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
}
void FRE() {
    //freopen("E:/MakeTest/Test.txt","r",stdin);
    freopen(task".inp", "r", stdin);
    freopen(task".out", "w", stdout);
}

const int N = 502;

int n, k;
main()
{
    IOS();
    // FRE();

    cin >> n >> k;

    for(int i = 1; i <= k; i ++) {
        cout << 2 * i << " " << 2 * i - 1 << " ";
    }
    for(int i = 2 * k + 1; i <= 2 * n; i ++) {
        cout << i << " ";
    }

    return 0;
}
/// Change Dream Magic Dr_Unicorn

/*
──────────────── Chill Bro ───────────
─▄▄▄───────────▄▄▄▄▄▄▄────────────────
█▀░▀█──────▄▀▀▀░░░░░░░▀▀▄▄────────────
█░░░░█───▄▀░░░░░░░░░░░░░░░▀▄───────▄▄▄
█▄░░░▀▄▄▀░░██░░░░░░░░░░░░░░▀█────█▀▀░█
─█░░░░█▀░░░▀░░░░░░░░██░░░░░░▀█─▄█░░░░█
─▀█░░▄█░░░░░░░▄▄▄░░░░▀░░░░░░░███░░░░█▀
──█▄░█░░░░░▄███████▄░░░░░░░░░█▀░░░░▄▀─
──▀█░█░░░░▄██████████░░░░░░░▄█░░░░▄▀──
───███░░░░███████████░░░░░░▄█░░░░█▀───
────█░░░░░██████████▀░░░░░░█░░░░█▀────
────█░░░░░░▀███████▀░░░░░░░█▄▄▄▀──────
────█░░░░░░░░▀▀▀▀░░░░░░░░░░░▀█────────
────█░░░░░░░░░░░░░░░░░░░░░░░░█────────
────█░░░░░░░░░░░░░░░░░░░░░░░░█────────
────█░░░░░░░░░░░░░░░░░░░░░░░░█────────
──────────────────────────────────────
*/


#include<bits/stdc++.h>
using namespace std;
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int t;cin>>t;while(t--)
    {
        int n,k,m;cin>>n;int a[n+1];
        bool flag = true;a[n] = 0;
        for(int i=0;i<n;i++)
            cin>>a[i];
        if(n==1)
            flag = true;
        else
        {
        while(true)
        {
            k = n,m = n;
            for(int i=0;i<n;i++)
            {
                if(a[i]>a[k])
                {
                    m = k;
                    k = i;
                }
                else if(a[i]>a[m])
                {
                    m = i;
                }
            }
            if(a[k]==1||a[m]==1)
            break;
            //cout<<"index "<<k<<' '<<m<<endl;
            a[k] -= (a[m]-1);
            a[m] = 1;
        }
        m = 0;int j = -1;
        //for(int i=0;i<n;i++)
          //  cout<<a[i]<<' ';
     //   cout<<endl;
        while(true)
        {
            //cout<<j<<endl;
            m++;
            k = n;
            for(int i=0;i<n;i++)
            {
                if(a[i]>a[k]&&i!=j)
                {
                    k = i;
                }
            }
            if(!a[k])
                break;
            a[k]--;
            j = k;
         //   for(int i=0;i<n;i++)
         //   cout<<a[i]<<' ';
      //  cout<<endl;
        }
       // cout<<m<<endl;
        m--;
        if(m%2)
            flag = true;
        else
            flag = false;
        }
        if(flag)
            cout<<"T";
        else
            cout<<"HL";
        cout<<'\n';

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int t;cin>>t;while(t--)
    {
        int n,k,m;cin>>n;int a[n+1];
        string ans = "T";
        for(int i=0;i<n;i++)
            cin>>a[i];a[n] = 0;
        if(n==1)
            ans = "T";
        else
        {
        while(true)
        {
            k = n,m = n;
            for(int i=0;i<n;i++)
            {
                if(a[i]>a[k])
                {
                    m = k;
                    k = i;
                }
                else if(a[i]>a[m])
                {
                    m = i;
                }
            }
            if(a[k]==1||a[m]==1)
            break;
            a[k] = a[k] - (a[m]-1);
            a[m] = 1;
        }
        m = 0;int j = -1;
        while(true)
        {
            m++;
            k = n;
            for(int i=0;i<n;i++)
            {
                if(a[i]>a[k]&&i!=j)
                {
                    j = i;
                    k = i;
                }
            }
            if(!a[k])
                break;
            a[k]--;
        }
        if(m%2)
            ans = "HL";
        else
            ans = "T";
        }
        cout<<ans<<'\n';

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int t;cin>>t;while(t--)
    {
        int n,k,m;cin>>n;int a[n+1];
        bool flag = true;a[n] = 0;
        for(int i=0;i<n;i++)
            cin>>a[i];
        if(n==1)
            flag = true;
        else
        {
        while(true)
        {
            k = n,m = n;
            for(int i=0;i<n;i++)
            {
                if(a[i]>a[k])
                {
                    m = k;
                    k = i;
                }
                else if(a[i]>a[m])
                {
                    m = i;
                }
            }
            if(a[k]==1||a[m]==1)
            break;
            //cout<<"index "<<k<<' '<<m<<endl;
            a[k] -= a[m]-1;
            a[m] = 1;
        }
        m = 0;int j = -1;
        //for(int i=0;i<n;i++)
          //  cout<<a[i]<<' ';
     //   cout<<endl;
        while(true)
        {
            //cout<<j<<endl;
            m++;
            k = n;
            for(int i=0;i<n;i++)
            {
                if(a[i]>a[k]&&i!=j)
                {
                    k = i;
                }
            }
            if(!a[k])
                break;
            a[k]--;
            j = k;
         //   for(int i=0;i<n;i++)
         //   cout<<a[i]<<' ';
      //  cout<<endl;
        }
       // cout<<m<<endl;
        m--;
        if(m%2)
            flag = true;
        else
            flag = false;
        }
        if(flag)
            cout<<"T";
        else
            cout<<"HL";
        cout<<'\n';

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int t;cin>>t;while(t--)
    {
        int n,k,m;cin>>n;int a[n+1];
        string ans = "T";
        for(int i=0;i<n;i++)
            cin>>a[i];a[n] = 0;
        if(n==1)
            ans = "T";
        else
        {
        /*while(true)
        {
            k = n,m = n;
            for(int i=0;i<n;i++)
            {
                if(a[i]>a[k])
                {
                    m = k;
                    k = i;
                }
                else if(a[i]>a[m])
                {
                    m = i;
                }
            }
            if(a[k]==1||a[m]==1)
            break;
            a[k] = a[k] - (a[m]-1);
            a[m] = 1;
        }*/
        m = 0;int j = -1;
        while(true)
        {
            m++;
            k = n;
            for(int i=0;i<n;i++)
            {
                if(a[i]>a[k]&&i!=j)
                {
                    j = i;
                    k = i;
                }
            }
            if(!a[k])
                break;
            a[k]--;
        }
        if(m%2)
            ans = "HL";
        else
            ans = "T";
        }
        cout<<ans<<'\n';

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int t;cin>>t;while(t--)
    {
        int n,k,m;cin>>n;int a[n+1];
        bool flag = true;
        for(int i=0;i<n;i++)
            cin>>a[i];
        if(n==1)
            flag = true;
        else
        {
        while(true)
        {
            k = 0,m = 1;
            for(int i=0;i<n;i++)
            {
                if(a[i]>a[k])
                {
                    m = k;
                    k = i;
                }
                else if(a[i]>a[m])
                {
                    m = i;
                }
            }
            if(a[k]==1||a[m]==1)
            break;
            a[k] -= a[m]-1;
            a[m] = 1;
        }
        m = 0;int j = -1;
        while(true)
        {
            m++;
            k = n;
            a[n] = 0;
            for(int i=0;i<n;i++)
            {
                if(a[i]>a[k]&&i!=j)
                {
                    j = i;
                    k = i;
                }
            }
            if(!a[k])
                break;
            a[k]--;
        }
        m--;
        if(m%2)
            flag = true;
        else
            flag = false;
        }
        if(flag)
            cout<<"T";
        else
            cout<<"HL";
        cout<<'\n';

    }
    return 0;
}


#include<bits/stdc++.h>
#define pb emplace_back
#define ll long long
#define mp make_pair
#define PI acos(-1)
using namespace std;
ll a[200005];
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    ll i,j,k,x,y,z,m,n,t,b,l,r,q;
    cin>>t;
    while(t--)
    {
        cin>>n;
        ll sum=0,mx=-1;
        for(i=1; i<=n; i++)
        {
            cin>>a[i];
            sum+=a[i];
            mx=max(mx,a[i]);
        }
        if(sum & 1)
            cout<<"T"<<'\n';
        else if(sum-mx<mx)
            cout<<"T"<<'\n';
        else
            cout<<"HL"<<'\n';
    }
}


#include<bits/stdc++.h>
#define pb emplace_back
#define ll long long
#define mp make_pair
#define PI acos(-1)
using namespace std;
ll a[200005];
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    ll i,j,k,x,y,z,m,n,t,b,l,r,q;
    cin>>t;
    while(t--)
    {
        cin>>n;
        ll sum=0;
        deque<ll>dq;
        for(i=1; i<=n; i++)
        {
            cin>>x;
            dq.push_back(x);
        }
        if(n==1)
        {
            cout<<"T"<<'\n';
            continue;
        }
        bool monu=0;
         sort(dq.begin(),dq.end());

        while(dq.size())
        {
            y=dq.front();
            dq.pop_front();
           // cout<<y<<" ";
            if(y>0)
            {
                y--;
                if(monu)
                    monu=0;
                else
                    monu=1;
                dq.push_back(y);
            }
            sort(dq.begin(),dq.end());

        }
        if(monu)
            cout<<"T"<<'\n';
        else
            cout<<"HL"<<'\n';
            dq.clear();
    }
}