#CCBCHBA0000123. Tam giác số ngược (Reverse Number Triangle)

Tam giác số ngược (Reverse Number Triangle)

Reverse Number Triangle

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

Given nn, print nn rows. The first contains 1,2,…,n1,2,\ldots,n; each subsequent row has one fewer number, and the last contains only 11. Separate consecutive numbers by exactly one space, without trailing spaces.

Input

One line contains integer nn.

Output

Print exactly nn rows.

Subtasks

  • Subtask 1 (20%): 1≤n≤51\le n\le 5.

  • Subtask 2 (30%): 1≤n≤151\le n\le 15.

  • Subtask 3 (50%): 1≤n≤301\le n\le 30.

Examples

Example 1

Input:

4

Output:

1 2 3 4
1 2 3
1 2
1

Explanation:

The row width decreases by one after each row.

Example 2

Input:

1

Output:

1

Explanation:

The row width decreases by one after each row.