#CCBCHBAHAI0000006. In k phần tử cuối (Print the Last k Elements)

In k phần tử cuối (Print the Last k Elements)

Print the Last k Elements

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

You are given an integer array aa of length nn, indexed from 00 to n−1n-1, and an integer kk satisfying 1≤k≤n1 \le k \le n. Print exactly the last kk elements. The first required index is n−kn-k and the last is n−1n-1.

Input

  • The first line contains two integers nn and kk.
  • The second line contains exactly nn integers a0,a1,…,an−1a_0,a_1,\ldots,a_{n-1}.

Output

Print an−k,an−k+1,…,an−1a_{n-k},a_{n-k+1},\ldots,a_{n-1} on one line, separated by spaces.

Subtasks

Subtask 1 (20 points): 1≤n≤101 \le n \le 10, k=1k=1, −9≤ai≤9-9 \le a_i \le 9.

Subtask 2 (30 points): 2≤n≤202 \le n \le 20, k=nk=n, 0≤ai≤1040 \le a_i \le 10^4.

Subtask 3 (50 points): 1≤k≤n≤10001 \le k \le n \le 1000, −109≤ai≤109-10^9 \le a_i \le 10^9.

Examples

Input

6 3
3 1 4 1 5 9

Output

1 5 9

Explanation

Here n=6n=6 and k=3k=3. The first required index is n−k=6−3=3n-k=6-3=3. Thus we print a3,a4,a5a_3,a_4,a_5, namely 1 5 9.