#B3955. Ri Matrix Pattern
Ri Matrix Pattern
Ri Matrix Pattern
Little Yang wants to construct an Ri Matrix (with being an odd number). The matrix has rows and columns. In each row, the first and the last characters are always |
. For the first row, the last row, and the middle row (i.e. the -th row), the characters from the 2nd to the -th positions are -
. All the remaining positions are filled with the lowercase letter x
.
For example, when , the matrix is:
|---| |xxx| |---| |xxx| |---|
inputFormat
A single integer (an odd number) representing the size of the matrix.
outputFormat
Print the Ri matrix as described. Each row should be printed on a new line.
sample
3
|-|
|-|
|-|
</p>