Number Triangle

Lab Python Beginner 10 points

Read n and print a triangle where row i contains the numbers 1 to i separated by spaces.

Input

One integer.

Output

n rows.

Example

Input

4

Output

1
1 2
1 2 3
1 2 3 4
Sample input available Sample output available
Editor
Python

Hints

The inner range depends on the outer loop variable.

Solution explanation

The row number controls how long each row is.

Show solution
n = int(input())
for i in range(1, n + 1):
    print(*range(1, i + 1))
Output
Answer
HOME LEARN COMMUNITY DASHBOARD