题目描述
Problem Description
Xiao Lu wants to construct a $N \times N$ T-shaped matrix ($N$ is an odd number). Specifically:
- The matrix has $N$ rows, each with $N$ characters, where the leftmost and rightmost columns are
|; - The first and last rows have
-in the 2nd to $(N-1)$th characters; - The middle row (i.e., the $\frac{N+1}{2}$th row) has
-in the 2nd to $\frac{N-1}{2}$th and $\frac{N+3}{2}$th to $(N-1)$th characters; - The middle column (i.e., the $\frac{N+1}{2}$th column) has
|in the 2nd to $\frac{N-1}{2}$th and $\frac{N+3}{2}$th to $(N-1)$th characters; - All other characters are the lowercase letter
x.
For example, a T-shaped matrix for $N = 5$ looks like this:
|---|
|x|x|
|-x-|
|x|x|
|---|
Please help Xiao Lu print the corresponding "T-shaped matrix" based on the given $N$.
Input Format
A single line containing an integer $N$ ($5 \leq N \leq 49$, ensuring $N$ is an odd number).
Output Format
Output the corresponding "T-shaped matrix".
Please strictly adhere to the format requirements and do not add any spaces, punctuation, or other symbols. You should output exactly $N$ lines, each containing exactly $N$ characters, which can be either -, |, or x. Your output must exactly match the standard answer to score points, so please check carefully before submitting.
Sample Input and Output
Sample Input #1
5
Sample Output #1
|---|
|x|x|
|-x-|
|x|x|
|---|
Sample Input #2
7
Sample Output #2
|-----|
|xx|xx|
|xx|xx|
|--x--|
|xx|xx|
|xx|xx|
|-----|
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分