A permutation p is an ordered group of numbers p_1,   p_2,   ...,   p_{n}, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p_1,   p_2,   ...,   p_{n}.

Simon has a positive integer n and a non-negative integer k, such that 2k ≤ n. Help him find permutation a of length 2n, such that it meets this equation: $\sum_{i = 1}^{n}|a_{2 i - 1} - a_{2i}|-|\sum_{i = 1}^{n} a_{2 i - 1} - a_{2i}|= 2 k$.


-----Input-----

The first line contains two integers n and k (1 ≤ n ≤ 50000, 0 ≤ 2k ≤ n).


-----Output-----

Print 2n integers a_1, a_2, ..., a_2n — the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them.


-----Examples-----
Input
1 0

Output
1 2
Input
2 1

Output
3 2 1 4

Input
4 0

Output
2 7 4 6 1 3 5 8



-----Note-----

Record |x| represents the absolute value of number x. 

In the first sample |1 - 2| - |1 - 2| = 0.

In the second sample |3 - 2| + |1 - 4| - |3 - 2 + 1 - 4| = 1 + 3 - 2 = 2.

In the third sample |2 - 7| + |4 - 6| + |1 - 3| + |5 - 8| - |2 - 7 + 4 - 6 + 1 - 3 + 5 - 8| = 12 - 12 = 0.

Difficulty: interview

Starter code:

Solutions:
n, k = map(int, input().split())
A = [i for i in range(2*n, 0, -1)]
for i in range(k):
    if i > n:
        i %= n
    A[2*i], A[2*i + 1] = A[2*i + 1], A[2*i]
print(' '.join(map(str, A)))

n,k=map(int,input().split())

if(k==0):
    print("1",end="")
    for i in range(2,2*n+1):
        print(" "+str(i),end="")
    print()

elif(2*k==n):
    i=n-(k//2)
    j=n+(k//2)
    if(j-i!=k):
        j+=1
    print(i,j,end="")
    start=1
    end=2*n
    while(start<end):
        if(start==i or start==j):
            start+=1
            continue
        if(end==j or end==i):
            end-=1
            continue
        print(" "+str(end),str(start),end="")
        start+=1
        end-=1
    print()
else:
    L=list(range(1,2*n+1))
    print("1 ",end=str(k+1))
    for i in range(2*n,0,-1):
        if(i==1 or i==k+1):
            continue
        print(" "+str(i),end="")
    print()



n, k = map(int, input().split())

if n == 0:
    print(0)
else:
    arr = [0] * 2 * n
    for i in range(2 * n):
        arr[i] = i + 1

for i in range(0, 2 * k, 2):
    temp = arr[i]
    arr[i] = arr[i + 1]
    arr[i + 1] = temp

for i in range(2 * n):
    print(arr[i], sep=' ', end=' ')


n, k = map(int, input().split())
for i in range(1, n+1):
    a, b = i*2, i*2-1
    if k:
        a, b = b, a
        k -= 1
    print(a, b, end=' ')


n,k=map(int,input().split())
for i in range(1,n+1):
    if(k>0):
        print(2*i-1,end=' ')
        print(2*i,end=' ')
        k-=1
    else:
        print(2*i,end=' ')
        print(2*i-1,end=' ')
        k-=1


n, k = [int(x) for x in input().split()]

for i in range(1, n+1):
    if i<=k:
        print(2*i-1, end=' ')
        print(2*i, end=' ')
    else:
        print(2*i, end=' ')
        print(2*i-1, end=' ')


n, k = map(int, input().split())
print(' '.join(str(i + 1) + ' ' + str(i) for i in range(1, 2 * k + 1, 2)) + ' ' + ' '.join(str(i) + ' ' + str(i + 1) for i in range(2 * k + 1, 2 * n + 1, 2)))

n, k = input().split()
n = int(n)
k = int(k)
for i in range(n):
    if (i >= k):
        print(i * 2 + 2, i * 2 + 1, end = ' ')
    else:
        print(i * 2 + 1, i * 2 + 2, end = ' ')


import math

def f(perm):
    a1 = 0
    a2 = 0
    for i in range(len(perm)//2):
        a1+=abs(perm[2*i]-perm[2*i+1])
    for i in range(len(perm)):
        if i%2 == 0:
            a2+=perm[i]
        else:
            a2-=perm[i]
    a2 = abs(a2)
    return (a1-a2)//2

perm = [7, 1, 2, 3, 4, 5, 6, 8, 9, 10]
#print(f(perm))
n, k = list(map(int, input().split(' ')))

res = []

if k == 0:
    for i in range(1, 2*n+1):
        res.append(i)
    print(res.__str__().replace(",", "").replace("[", "").replace("]", ""))
    return

if n%2 == 0:
    znak = 1+k
else:
    if k == n:
        znak = k+2
    else:
        znak = k+1

res.append(znak)
res.append(1)
pointer = 2

if pointer == znak:
    pointer+=1

for i in range(n-1):
    a = pointer

    pointer+=1
    if pointer == znak:
        pointer+=1

    b = pointer

    pointer+=1
    if pointer == znak:
        pointer+=1

    res.append(a)
    res.append(b)

print(res.__str__().replace(",", "").replace("[", "").replace("]", ""))





def main():
    n, k = [int(x) for x in input().split()]
    for i in range(n):
        if k > 0:
            print(2*i + 1, 2*i + 2, end=' ')
            k -= 1
        else:
            print(2*i + 2, 2*i + 1, end=' ')



def __starting_point():
    main()
__starting_point()

n, k = map(int, input().split())
v = list(range(1, 2 * n + 1))
for i in range(k):
    v[2 * i], v[2 * i + 1] = v[2 * i + 1], v[2 * i]
print(' '.join(map(str, v)))

n,k = list(map(int, input().split()))
A = [i for i in range(0, (2*n)+1)]
for i in range(1,k+1):
    A[2*i], A[2*i-1] = A[2*i-1], A[2*i]
print(" ".join(map(str, A[1:])))


n, k = map(int, input().split())
p = [str(i) for i in range(1, 2 *n + 1)]
for i in range(k):
  p[2 * i], p[2 * i + 1] = p[2 * i + 1], p[2 * i]
print(" ".join(p))

a=input()
n,k=a.split(" ");
n=int(n)
k=int(k)
b=list()
b+=[0]
for i in range(1,2*n+1):
	b+=[i]
for i in range(1,k+1):
	b[2*i],b[2*i-1]=b[2*i-1],b[2*i]
for i in range(1,2*n+1):
	print(b[i],end=" ")

n, k = list(map(int, input().split()))

p = [str(i) for i in range(1, 2 *n + 1)]

for i in range(k):

  p[2 * i], p[2 * i + 1] = p[2 * i + 1], p[2 * i]

print(" ".join(p))



# Made By Mostafa_Khaled


def f(s):
    A = [int(i) for i in s.split()]
    first = 0
    for i in range(0,len(A)-1,2):
        first += abs(A[i+1]-A[i])
    second = 0
    for i in range(0,len(A)-1,2):
        second += A[i]-A[i+1]
    second = abs(second)
    return first -second


'''
For a given n, if k=n+2, do [n-1, n-2, ..., 1, n]

'''
n, k = [int(i) for i in input().split()]
k = 2*k
if k == 0:
    print(*[i for i in range(1,2*n+1)])
elif k==2*n:
    print(2*n,end=' ')
    for i in range(2*n-2,0,-1):
        print(i,end=' ')

    print(1)
else:
    for i in range(k+1,0,-1):
        print(i,end=' ')
    for i in range(k+2,2*n+1):
        print(i,end=' ')
    print()


R = lambda: map(int, input().split())
n, k = R()
arr = [i + 1 for i in range(n * 2)]
for i in range(0, 2 * k, 2):
    arr[i], arr[i + 1] = arr[i + 1], arr[i]
print(' '.join(map(str, arr)))


n,k = map(int,input().split())
ans = []
for i in range(1,2*n+1):
    ans.append(i)

for i in range(0,2*k,2):
    ans[i],ans[i+1] = ans[i+1],ans[i]

print(*ans)

n,k = map(int,input().split())
ans = []
for i in range(1,2*n +1,2):
    if k>0:
        ans.append(i+1)
        ans.append(i)
        k-=1
    else:
        ans.append(i)
        ans.append(i+1)
print(*ans)


n,k=input().split()

n=int(n)
k=int(k)
l=[]
l.append(0)
for i in range(1,2*n+1):
	l.append(i)
for i in range(1,k+1):
	x=2*i-1
	y=2*i
	l[x],l[y]=l[y],l[x]
for i in range(1,2*n+1):
	print(l[i],end=" ")


n,k=input().split()
#ksnf;s
n=int(n)
k=int(k)
l=[]
l.append(0)
for i in range(1,2*n+1):
	l.append(i)
for i in range(1,k+1):
	x=2*i-1
	y=2*i
	l[x],l[y]=l[y],l[x]
for i in range(1,2*n+1):
	print(l[i],end=" ")


n,k = list(map(int,input().strip().split()))

if k!=0:
    ans = [1+k,1]
else:
    ans = [1,2]
i = 2
z = ans[1]
while i<2*n:
    z+=1
    if z==1+k:continue
    ans.append(z)
    i+=1

print(*ans)



n, k = map(int, input().split())
for i in range(n):
    if (i >= k): print(i * 2 + 2, i * 2 + 1, end = ' ')
    else: print(i * 2 + 1, i * 2 + 2, end = ' ')


n, k = map(int,input().split())
t = [i+1 for i in range(2*n)]
t = t[::-1]
index = t.index(k+1)
if k > 0:
    if k % 2 == 1:
        for i in range(2*n-1,index,-1):
            t[i] = t[i-1]
        t[index] = 1

    else:
        index = t.index(2*k)
        for i in range(index,2*n-1,2):
            t[i],t[i+1] = t[i+1],t[i]

for i in range(2*n):
    print(t[i],end = ' ')