Mirko has become a hardcore patriot, so he has asked you to draw him a Croatian chessboard (checkerboard).
The chessboard consists of red and white cells. The upper left cell is red, with the remaining cells
alternating between white and red in rows as well as columns. We will represent red areas with X
characters, and white areas with .
characters.
Mirko's chessboard should consist of cells, that is, rows and columns. Each row should be characters high, and each column characters wide. Consider the sample tests below for further clarification.
Input Specification
The first line of input contains two positive integers and from the problem statement.
The second line of input contains two positive integers and from the problem statement.
Output Specification
The output must consist of a total of rows and columns, forming the chessboard described above.
Sample Input 1
2 4
2 2
Sample Output 1
XX..XX..
XX..XX..
..XX..XX
..XX..XX
Sample Input 2
5 5
2 3
Sample Output 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
Comments