Combine what you've learned to print a diamond, a pyramid on top of an upside-down pyramid.
For N = 3 the rows have 1, 3, 5, 3 and 1 stars, each centred with spaces on the left. See Example 1 for the exact shape.
Input Format
A single integer N (the number of rows in the top half, including the middle row).
Output Format
Print 2N - 1 lines. Do not print spaces after the stars.
Constraints
• 1 ≤ N ≤ 30
Examples
Example 1
Input
3
Output
*
***
*****
***
*
Explanation Pyramid of 3 rows, then 2 rows shrinking back.
Example 2
Explanation Just one star.
Example 3
Explanation Three lines: 1, 3 and 1 stars.
Acceptance
—
Accepted
0
Submissions
0