#CCBCHBA0000118. Tháp sao cân đối (Centered Star Pyramid)

Tháp sao cân đối (Centered Star Pyramid)

Centered Star Pyramid

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

Given nn, print a centered pyramid of exactly nn rows. Row ii (1-based) starts with n−in-i spaces followed by 2i−12i-1 asterisks. Do not add trailing spaces; end each row with a newline.

Input

One line contains integer nn.

Output

Print exactly nn pyramid 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:

1

Output:

*

Explanation:

Each row has n-i leading spaces and 2i-1 stars.

Example 2

Input:

4

Output:

   *
  ***
 *****
*******

Explanation:

Each row has n-i leading spaces and 2i-1 stars.