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 collections import defaultdict, deque, Counter
from functools import lru_cache, reduce 
from heapq import heappush, heappop, heapify
from bisect import bisect_right, bisect_left
from random import randint
from fractions import Fraction as frac
import math
import operator
import sys

#sys.stdin = open("sleepy.in", "r")
#sys.stdout = open("sleepy.out","w")
#input = sys.stdin.readline
#print = sys.stdout.write

hpop = heappop
hpush = heappush
MOD = 10**9 + 7

"""
# if in possition that it
# as close as possible
"""
def solution():
    n,k = map(int, input().split())
    # revers k + 1 amount fo them
    
    arr = list(range(1,n+1))
    k += 1
    arr = arr[:k][::-1] + arr[k:]
    return print(*arr)

    



def main():
    #test()
    t = 1
    #t = int(input())
    for _ in range(t):
        solution() 

#import sys
#import threading
#sys.setrecursionlimit(10**6)
#threading.stack_size(1 << 27)
#thread = threading.Thread(target=main)
#thread.start(); thread.join()
main()
 
 
 



    # this is merg sort

    # this is recursion
    # swaping and checking if they are sorted orded

    # ## ## if not swap them and check and continue

    # I should have swap function

    # merge sort
    # left and right pointer
    # if imposible to sort
