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.
# A. Slightly Decreasing Permutations
# https://codeforces.com/contest/285/problem/A
n, k = map(int, input().split())
A = [0] * n
curr_k = n
curr = 1
for i in range(n):
    if k > 0 :
        A[i] = curr_k
        k -= 1
        curr_k -= 1
    else:
        A[i] = curr
        curr += 1
print(*A)

"""
# B. Kuriyama Mirai's Stones
# https://codeforces.com/problemset/problem/433/B
n = int(input())
A = [int(a) for a in input().split()]
B = [0] * n
C = [0] * n

B[0] = A[0]
for i in range(n):
    B[i] = B[i - 1] + A[i]

A.sort()
C[0] = A[0]
for i in range(n):
    C[i] = C[i - 1] + A[i]

for _ in range(int(input())):
    t, l, r = map(int, input().split())
    if t == 1:
        if l >= 2:
            print(B[r - 1] - B[l - 2])
        else:
            print(B[r - 1])
    else:
        if l >= 2:
            print(C[r - 1] - C[l - 2])
        else:
            print(C[r - 1])


# C. Building Permutation
# https://codeforces.com/contest/285/problem/C
A = [int(a) for a in input().split()]
A.sort()
ans = 0
curr = 1
for i in range(int(input())):
    if A[i] < curr:
        ans += abs(curr - A[i])
        A[i] = curr
    elif A[i] > curr:
        ans += abs(A[i] - curr)
        A[i] = curr
    curr += 1
print(ans)


# C. Djikstra.
# https://codeforces.com/problemset/problem/20/C
"""