#t54. 小杨的 X 字矩阵

小杨的 X 字矩阵

Xiaoyang's X Matrix

Problem Description

Xiaoyang wants to construct an N×NN \times N X-shaped matrix (NN is odd). Both diagonals of this matrix are the half-width plus sign +, and all the other positions are the half-width minus sign -. For example, a 5×55 \times 5 X-shaped matrix is as follows:

+---+
-+-+-
--+--
-+-+-
+---+

Please help Xiaoyang print the corresponding "X matrix" for the given NN.

Input Format

One line containing one integer NN.

Output Format

Output the corresponding "X matrix".

Strictly follow the required format: do not add any spaces, punctuation, blank lines, or any other symbols on your own. You should output exactly NN lines, each line containing exactly NN characters besides the newline — each of which is either + or -.

Sample Input

Sample Input 1

5

Sample Input 2

7

Sample Output

Sample Output 1

+---+
-+-+-
--+--
-+-+-
+---+

Sample Output 2

+-----+
-+---+-
--+-+--
---+---
--+-+--
-+---+-
+-----+

Sample Explanation

For sample input 1, N=5N = 5. The main diagonal (row ii, column ii) and the anti-diagonal (row ii, column N−i+1N - i + 1) are +, and all other positions are -. So a 5×55 \times 5 X-shaped matrix is generated as shown in the output.

Constraints

For all data, 5≤N≤495 \le N \le 49, and NN is guaranteed to be odd.