Let's build a proper pyramid like the temple gopuram. Row i has 2i - 1 stars, centred using spaces on the left.
For N = 3, the top row is 2 spaces and 1 star, the middle row is 1 space and 3 stars, and the base is 5 stars. See Example 1 for the exact shape.
Input Format
A single integer N.
Output Format
Print N lines. Line i has N - i spaces followed by 2i - 1 stars. Do not print spaces after the stars.
Constraints
• 1 ≤ N ≤ 40
Examples
Example 1
Input
3
Output
*
***
*****
Explanation Row 1: 2 spaces + 1 star. Row 2: 1 space + 3 stars. Row 3: 0 spaces + 5 stars.
Example 2
Explanation A single star.
Example 3
Input
5
Output
*
***
*****
*******
*********
Explanation A 5-row pyramid with 9 stars at the base.
Acceptance
—
Accepted
0
Submissions
0