#CCBCHBA0000099. Tam giác dấu sao phải (Right-Aligned Star Triangle)

Tam giác dấu sao phải (Right-Aligned Star Triangle)

Right-Aligned Star Triangle

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

Given nn, print exactly nn lines. Line ii begins with exactly n−in-i ordinary spaces, followed by exactly ii consecutive *. Every line has exactly nn characters counting its leading spaces; no trailing spaces.

Input

One line contains integer nn.

Output

Print nn lines, preserving the specified leading spaces.

Subtasks

  • Subtask 1 (20%): 1≤n≤31\le n\le 3.

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

  • Subtask 3 (50%): 1≤n≤1001\le n\le 100.

Examples

Example 1

Input:

4

Output:

   *
  **
 ***
****

Explanation:

Row i contains n-i leading spaces followed by i stars. For this sample, the input is 4; the displayed rows follow these rules exactly.

Example 2

Input:

1

Output:

*

Explanation:

Row i contains n-i leading spaces followed by i stars. For this sample, the input is 1; the displayed rows follow these rules exactly.