405215: GYM101845 L L-shapes

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

L. L-shapestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

The Che square of the Universidad Nacional de Colombia is represented by an N × N matrix and is going to be remodeled. To achieve this goal, the engineers have one 1 × 1 square-tile and a lot of L-tiles (Enough to fill the entire Che square). Unfortunately, one of the workers have placed the square tile at location in row R and column C ignoring the fact that this could affect the positions of other tiles. Given the importance of the Che square, we need your help in order to know how to place the rest of the tiles so that all N2 positions of the Che square are covered by exactly tile.

The rotations of a L-tile are showed at the following figure, you can place each L-tile in the rotation you want.

Input

The first line contains N (1 ≤ N ≤ 2048, will be a power of 2), the size of the square matrix. The second line contains integers R and C (1 ≤ R, C ≤ N), the row and the column where the worker placed the square tile.

Output

Print a matrix of size N × N ]. The C-th character of the R-th line must be a dot ('.'), representing the 1 × 1 square tile. Every L-tiles must be represented by three uppercase letters. If two L-tiles are adjacent to each other (share more than a point), they must be represented by different letters. Since there are many possible answers, you can print any.

ExampleInput
8
3 4
Output
BBCCBBCC
BAACBAAC
CAB.CCAB
CCBBACBB
BBCAABCC
BACCBBAC
CAABCAAB
CCBBCCBB

加入题单

上一题 下一题 算法标签: