시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB18161172106966.896%

문제

상근이는 체스판을 만들려고 한다.

체스판은 검정칸과 흰칸으로 이루어져 있다. 가장 왼쪽 위칸의 색은 검정색이고, 나머지 색은 검정과 흰색이 번갈아가면서 등장한다. 검정색은 'X'로, 흰색은 '.'로 표시한다.

상근이의 체스판은 R행 * C열로 이루어져 있어야 한다. 또, 각각의 행의 높이는 문자 A개만큼 이며, 각각의 열의 너비는 문자 B개 만큼이다. 예제 출력을 보고 이해하면 쉽다.

R, C, A, B가 주어졌을 때, 상근이의 체스판을 출력하는 프로그램을 작성하시오.

입력

첫째 줄에 두 양의 정수 R과 C가 주어진다. (1 ≤ R, C ≤ 10)

둘째 줄에 두 양의 정수 A와 B가 주어진다. (1 ≤ A, B ≤ 10)

출력

출력은 R * A행 C * B열로 이루어져 있어야 하며, 문제에서 설명한 상근이의 체스판을 출력한다.

예제 입력 1

2 4
2 2

예제 출력 1

XX..XX..
XX..XX..
..XX..XX
..XX..XX

예제 입력 2

5 5
2 3

예제 출력 2

XXX...XXX...XXX
XXX...XXX...XXX
...XXX...XXX...
...XXX...XXX...
XXX...XXX...XXX
XXX...XXX...XXX
...XXX...XXX...
...XXX...XXX...
XXX...XXX...XXX
XXX...XXX...XXX
W3sicHJvYmxlbV9pZCI6IjMwNzYiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWMwYzFcdWFkZmNcdWM3NzRcdWM3NTggXHVjY2I0XHVjMmE0XHVkMzEwIiwiZGVzY3JpcHRpb24iOiI8cD5cdWMwYzFcdWFkZmNcdWM3NzRcdWIyOTQgXHVjY2I0XHVjMmE0XHVkMzEwXHVjNzQ0IFx1YjljY1x1YjRlNFx1YjgyNFx1YWNlMCBcdWQ1NWNcdWIyZTQuPFwvcD5cclxuXHJcbjxwPlx1Y2NiNFx1YzJhNFx1ZDMxMFx1Yzc0MCBcdWFjODBcdWM4MTVcdWNlNzhcdWFjZmMgXHVkNzcwXH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