시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 (추가 시간 없음) 512 MB 9 5 5 83.333%

문제

An r × c grid of squares is to be colored in a checkerboard style. The board will be filled with rectangles made up of the grid squares. The heights and widths of the rectangles will be specified. Black and White are the only two colors of the rectangles. Any two adjacent rectangles that share a side should be colored differently. The top-left rectangle should be Black. Print the checkerboard.

입력

The first line contains four space-separated integers r, c, v and h (1 ≤ vr ≤ 50, 1 ≤ hc ≤ 50) where the checkerboard is to have r rows and c columns, with v rectangles vertically and h rectangles horizontally.

Each of the next v lines contain a single positive integer a. The sum of the a values will be exactly r. These are the heights of the v rectangles in each column, in order from top to bottom.

Each of the next h lines contain a single positive integer b. The sum of the b values will be exactly c. These are the widths of the h rectangles in each row, in order from left to right.

출력

Print the described checkerboard, in the form of r strings of length c, one per line. The strings should only contain the characters upper-case B (for a Black square) and upper-case W (for a White square).

예제 입력 1

6 5 3 2
1
2
3
3
2

예제 출력 1

BBBWW
WWWBB
WWWBB
BBBWW
BBBWW
BBBWW

예제 입력 2

4 4 2 2
1
3
3
1

예제 출력 2

BBBW
WWWB
WWWB
WWWB