题目描述
Problem Description
The president of AtCoder, chokudai, prepared a rectangular cake for the participants of the CODE FESTIVAL 2018 finals.
This cake is divided vertically into $ N $ divisions and horizontally into $ N $ divisions, resulting in a total of $ N^2 $ pieces.
chokudai's pet dog, Richard, participated in the CODE FESTIVAL 2018 qualifiers but barely missed passing.
So, Richard decided to spray some pieces of the cake that will be distributed in the finals, making all pieces inedible.
When a piece is sprayed, all adjacent pieces to it will also become inedible.
Adjacent pieces refer to those that share a face.
Find a way for Richard to achieve his goal with the spray. Also, since using too much time spraying might get noticed by chokudai, the number of pieces to be sprayed must be within $ 201,800 $.
Input Format
The input is given from the standard input in the following format:
$ N $
Output Format
From the 1st line to the $ N $th line, output a string of length $ N $ each. These $N \times N$ strings correspond to the cake viewed from the top (each character represents one piece), where X indicates a sprayed piece and . indicates an unsprayed piece. The number of Xs must be within $ 201,800 $.
It can be shown that under the given constraints, there always exists a way to achieve the goal. If multiple solutions exist, any of them can be output.
Sample Input and Output
Sample Input #1
3
Sample Output #1
X..
..X
X..
Sample Input #2
6
Sample Output #2
X.X..X
..X.X.
X..X..
.X...X
X..X..
.X..X.
Sample Input #3
21
Sample Output #3
XXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXX
X....X....X....X....X
X.XXXX.XX.XX.X.X.XXXX
X.XXXX.XX.XX.X.X....X
X.XXXX.XX.XX.X.X.XXXX
X....X....X....X....X
XXXXXXXXXXXXXXXXXXXXX
X....X....XX...X....X
X.XXXX.XXXX.XXXXXX.XX
X....X....XX..XXXX.XX
X.XXXX.XXXXXXX.XXX.XX
X.XXXX....X...XXXX.XX
XXXXXXXXXXXXXXXXXXXXX
XXX.XX.XX.X....X.XXXX
XXX.XX.XX.X.XX.X.XXXX
XXX.XX.XX.X....X.XXXX
XXX.XXX..XX.XX.X.XXXX
XXX.XXXX.XX.XX.X....X
XXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXX
Notes/Hints
Constraints
- $ N $ is an integer between $ 1 $ and $ 1,000 $ inclusive.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分