#t94. 小杨的日字矩阵

小杨的日字矩阵

Xiaoyang's "Ri" Matrix

Problem Description

Xiaoyang wants to construct an N×NN \times N "Ri" matrix (日, the Chinese character for "sun"; NN is odd). Specifically, this matrix has NN rows, each with NN characters. The leftmost column and the rightmost column are both |, while the first row, the last row, and the middle row (the (N+12)(\frac{N+1}{2})-th row) have - for their 22-nd to (N−1)(N-1)-th characters; all the remaining characters are the half-width lowercase letter x. For example, an N=5N = 5 "Ri" matrix is as follows:

|---|
|xxx|
|---|
|xxx|
|---|

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

Input Format

One line containing one integer NN (5≤N≤495 \le N \le 49, and NN is guaranteed to be odd).

Output Format

Output the corresponding "Ri matrix".

Strictly follow the required format: do not add any spaces, punctuation, or other symbols on your own. You must output exactly NN lines, each line containing exactly NN characters besides the newline — each of which is either -, |, or x. Your output must match the standard answer exactly to get credit; please check carefully before submitting.

Sample Input

Sample Input 1

5

Sample Input 2

7

Sample Output

Sample Output 1

|---|
|xxx|
|---|
|xxx|
|---|

Sample Output 2

|-----|
|xxxxx|
|xxxxx|
|-----|
|xxxxx|
|xxxxx|
|-----|

Sample Explanation

For sample input 1, N=5N = 5. The matrix has 55 rows, each with 55 characters.

The middle row is the 5+12=3\frac{5+1}{2} = 3rd row.

  • The 11st and 55th rows (first and last): the leftmost and rightmost columns are |, and the middle 33 characters are -, so it is |---|.
  • The 33rd row (middle): likewise the leftmost and rightmost columns are |, and the middle 33 characters are -, so it is also |---|.
  • The 22nd and 44th rows: the leftmost and rightmost columns are |, and the middle 33 characters are x, so it is |xxx|.

So the output matrix is as shown above.

Constraints

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