Symmetric Number Pyramid
Given a positive integer n, print a centered number pyramid. Line i contains increasing digits from 1 to i, then decreasing digits from i - 1 to 1.
Input
- One positive integer n.
Output
- Use leading spaces to center the pyramid. Do not print trailing spaces.
Constraints
- 1 <= n <= 9
Example
Input
5
Output
1
121
12321
1234321
123454321
Comments