Permutation *p* is an ordered set of integers *p*<sub class="lower-index">1</sub>,  *p*<sub class="lower-index">2</sub>,  ...,  *p*<sub class="lower-index">*n*</sub>, consisting of *n* distinct positive integers, each of them doesn't exceed *n*. We'll denote the *i*-th element of permutation *p* as *p*<sub class="lower-index">*i*</sub>. We'll call number *n* the size or the length of permutation *p*<sub class="lower-index">1</sub>,  *p*<sub class="lower-index">2</sub>,  ...,  *p*<sub class="lower-index">*n*</sub>.

The decreasing coefficient of permutation *p*<sub class="lower-index">1</sub>, *p*<sub class="lower-index">2</sub>, ..., *p*<sub class="lower-index">*n*</sub> is the number of such *i* (1 ≤ *i* &lt; *n*), that *p*<sub class="lower-index">*i*</sub> &gt; *p*<sub class="lower-index">*i* + 1</sub>.

You have numbers *n* and *k*. Your task is to print the permutation of length *n* with decreasing coefficient *k*.
The single line contains two space-separated integers: *n*, *k* (1 ≤ *n* ≤ 10<sup class="upper-index">5</sup>, 0 ≤ *k* &lt; *n*) — the permutation length and the decreasing coefficient.
import dis,sys, os.path
if(os.path.exists('in_py.txt')):
    sys.stdin = open("in_py.txt","r")
    sys.stdout = open("out_py.txt","w")

input = sys.stdin.readline

############ ---- Input Functions ---- ############

# inp — For taking integer inputs.

# inlt — For taking List inputs.

# insr — For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are Immutable.

# invr — For taking space seperated integer variable inputs.

# The input = sys.stdin.readline is actually for Faster Inputs, because line reading through System STDIN (Standard Input) is faster in Python.


def inp():
    return(int(input())) 
def inlist():
    return(list(map(int,input().split()))) 
def insr():
    s=input()
    return(list(s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))

def swap():
  a=5
  b=4
  a, b = b, a


n,k=invr()
v=[]
i=0
while i<n:
	v.append(i+1)
	i+=1
i=0


if(n-k==1 or n-k<=2 and n>3):
	v.reverse()
else:
	while i<n-1 and k>0:
		if(v[i]<v[i+1] and k>0):
			v[i],v[i+1]=v[i+1],v[i]
			k-=1
			i+=2
		else:
			i+=1

for i in v:
	print(i , end=" ")
print()


