#CCBCHBA0000120. Tam giác số theo vị trí (Position-Based Number Triangle)

Tam giác số theo vị trí (Position-Based Number Triangle)

Position-Based Number Triangle

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

Given nn, print exactly nn rows. Row ii contains integers 1,2,…,i1,2,\ldots,i in increasing order, separated by one space without leading or trailing spaces.

Input

One line contains integer nn.

Output

Print the triangle in exactly nn lines.

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:

3

Output:

1
1 2
1 2 3

Explanation:

Row i contains 1 through i.

Example 2

Input:

1

Output:

1

Explanation:

Row i contains 1 through i.