#t99. 绘制菱形

绘制菱形

Drawing a Diamond

Problem Description

Given a positive integer nn, draw a diamond of side length nn grid cells on a canvas of (2n−1)×(2n−1)(2n - 1) \times (2n - 1) cells, using characters. Empty cells are represented by ⋅\cdot, and the cells on the edges of the diamond are represented by ++.

For example, when n=3n = 3, the figure is as follows:

..+..
.+.+.
+...+
.+.+.
..+..

Input Format

Input a positive integer nn.

Output Format

Output 2n−12n - 1 lines, representing the diamond drawn as required.

Sample Input

4

Sample Output

...+...
..+.+..
.+...+.
+.....+
.+...+.
..+.+..
...+...

Sample Explanation

When n=4n = 4, the canvas size is $(2 \times 4 - 1) \times (2 \times 4 - 1) = 7 \times 7$. We need to draw a diamond of side length 4, i.e. each edge consists of 44 + characters (including the vertices). Starting from the top, the + in the 1st row is at the center (4th character); the 2nd row has two + at positions 3 and 5 with one . in between; the 3rd row has two + at positions 2 and 6 with three . in between; the 4th row (center row) has two + at positions 1 and 7 with five . in between. The lower half is symmetric to the upper half: the 5th row equals the 3rd, the 6th equals the 2nd, and the 7th equals the 1st. This gives the figure in the sample.

Constraints

3≤n≤153 \le n \le 15.