P27929 [洛谷] [Language Monthly Contest 202406] Xiao Z's Z Matrix
普及-
题目描述

Problem Description

Xiao Z wants a $n \times n$ Z matrix. Specifically, this matrix has $n$ rows, each containing $n$ characters. The first row, the last row, and the anti-diagonal are filled with the character Z, while the rest of the matrix is filled with the character -.

For example, a Z matrix with $n = 6$ looks like this:

ZZZZZZ
----Z-
---Z--
--Z---
-Z----
ZZZZZZ

Input Format

A single line containing an integer $n$.

Output Format

A total of $n$ lines, each containing $n$ characters. The output should form a Z matrix.

Sample Input and Output

Sample Input #1

6

Sample Output #1

ZZZZZZ
----Z-
---Z--
--Z---
-Z----
ZZZZZZ

Sample Input #2

5

Sample Output #2

ZZZZZ
---Z-
--Z--
-Z---
ZZZZZ

Notes

Data Size and Constraints

For 60% of the test cases, $3 \le n \le 10$.
For 100% of the test cases, $3 \le n \le 100$.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
6
样例输出
ZZZZZZ ----Z- ---Z-- --Z--- -Z---- ZZZZZZ