Symmetric Number Pyramid


Submit solution

Points: 10
Time limit: 1.0s
Memory limit: 256M

Author:
Problem types

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

There are no comments at the moment.