LearnPy Hub
← Introduction & print() problems
Hard

Hollow Diamond

Read n and print a hollow diamond of * with 2n − 1 lines: line i (from the top, 1-based, up to n) has n − i leading spaces, then a star, and for i > 1 a gap of 2i − 3 spaces and another star. The bottom half mirrors the top. No trailing spaces.

Input

One integer n ≥ 1.

Output

2n − 1 lines.

Sample 1

Input
3
Output
  *
 * *
*   *
 * *
  *

Sample 2

Input
1
Output
*
solution.py
Output appears here
Hollow Diamond · Python practice problem · LearnPy Hub