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.
from sys import stdin, stdout
from heapq import heapify , heappush , heappop
import sys
from collections import Counter,defaultdict,deque
from copy import deepcopy
import math
from itertools import permutations

sys.setrecursionlimit(10 ** 5)

mod = 10 **9 + 7

def gcd(a,b):
    if(b==0):
        return a
    else:
        return gcd(b,a%b)

def SieveOfEratosthenes(n):
    prime = [True for i in range(n + 1)]
    p = 2
    while (p * p <= n):
        if (prime[p] == True):
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 1
    prime[0]= False
    prime[1]= False
    ans = []
    for p in range(n + 1):
        if prime[p]:
            ans.append(p)
    return ans


def mapinput():
    return  map(int, stdin.readline().split())

def strinput():
    return stdin.readline().strip()

def listinput():
    return list(map(int,stdin.readline().split()))

def intinput():
    return int(stdin.readline().strip())

def bins(lis , val):
    low = 0
    high = len(lis) - 1
    while low <= high:
        mid = (low + high)>>1
        if lis[mid][0] == val:
            return mid
        elif lis[mid][0] > val:
            high = mid - 1
        else:
            low = low + 1
    #print("ret")
    return low        

for test in range(1):
    def solve():
        n , k = mapinput()
        ans = [i for i in range(n,0,-1) ]
        k = n- k
        an = []
        while k > 1:
            an.append(ans.pop())
            k -= 1
        return an + ans

    print(*solve())
                


    


    
