P27874 [洛谷] [GESP Sample Question Level 2] Drawing a Square
普及-
题目描述

Problem Description

Given a positive integer $n$, you are required to output a square pattern of $n$ rows and $n$ columns (refer to the sample input and output). The pattern consists of uppercase letters.

Specifically, the first row starts with the uppercase letter $\texttt A$, the second row starts with the uppercase letter $\texttt B$, and so on. Within each row, the second column contains the next letter after the first column, the third column contains the next letter after the second column, and so on. Notably, the letter following uppercase letter $\texttt Z$ is uppercase letter $\texttt A$.

Input Format

Input consists of a single line containing a positive integer $n$. It is guaranteed that $2 \le n \le 40$.

Output Format

Output the square pattern that meets the requirements.

Sample Input and Output

Sample Input #1

3

Sample Output #1

ABC
BCD
CDE

Sample Input #2

5

Sample Output #2

ABCDE
BCDEF
CDEFG
DEFGH
EFGHI
输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
3
样例输出
ABC BCD CDE