Skip to main content
LIVE CONTEST: ALGOR Contest: Round #4 (Special Challenge) is live now!

~/algor $ cat problems/rekursiya-n-dan-1-gacha-chop-etish

Print from N to 1

Easy 1000 ms 64 MB 21%
Share

You are given a positive integer $n$. Using a recursive function, print all integers from $n$ down to $1$ in descending order on one line, separated by spaces.

Do not use loops (for, while); use recursive calls.

Each call first prints its own number, then calls the next one: from n to 1

Input

One line with one positive integer $n$ ($1 \le n \le 100$).

Output

The numbers from $n$ to $1$ in descending order, separated by spaces.

Note

$1 \le n \le 100$

Examples

Input #1
1
Output #1
1
Input #2
5
Output #2
5 4 3 2 1

Sign in to submit a solution

Signing up is free and takes a minute.