Codeforces Beta Round 89 (Div. 2)
B
Present from Lena
Codeforces
1000
原题
← AC →
翻译中…

Vasya's birthday is approaching and Lena decided to sew a patterned handkerchief to him as a present. Lena chose digits from $0$ to $*n*$ as the pattern. The digits will form a rhombus. The largest digit $*n*$ should be located in the centre. The digits should decrease as they approach the edges. For example, for $*n* = 5$ the handkerchief pattern should look like that:

翻译中…

          0
        0 1 0
      0 1 2 1 0
    0 1 2 3 2 1 0
  0 1 2 3 4 3 2 1 0
0 1 2 3 4 5 4 3 2 1 0
  0 1 2 3 4 3 2 1 0
    0 1 2 3 2 1 0
      0 1 2 1 0
        0 1 0
          0

翻译中…

Your task is to determine the way the handkerchief will look like by the given $*n*$.

翻译中…

Input

翻译中…

The first line contains the single integer $*n*$ ($2 ≤ *n* ≤ 9$).

翻译中…

Output

翻译中…

Print a picture for the given $*n*$. You should strictly observe the number of spaces before the first digit on each line. Every two adjacent digits in the same line should be separated by exactly one space. There should be no spaces after the last digit at the end of each line.

翻译中…

样例

Input #1
2
Output #1
    0
  0 1 0
0 1 2 1 0
  0 1 0
    0
InputCopy OutputCopy
Input #2
3
Output #2
      0
    0 1 0
  0 1 2 1 0
0 1 2 3 2 1 0
  0 1 2 1 0
    0 1 0
      0
InputCopy OutputCopy
题目信息
题号
118B
时间限制
2 s
内存限制
256 MB
标签
构造
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。