FTB - Fill the board

Lets go easy! Celebrate new year 2015 and design a chessboard.

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' (uppercase letter x) characters, and white areas with '.' (period) characters. The chessboard should consist of R × C cells, that is, R rows and C columns. Each row should be A characters high, and each column B characters wide. Consider the sample tests below for further clarification.

Input

The first line of input contains two positive integers R and C (1 <= R, C <= 10) from the problem statement. The second line of input contains two positive integers A and B (1 <= A, B <= 10) from the problem statement.

Output

The output must consist of a total of R×A rows and C×B columns, forming the chessboard described above.

Sample

Input:
2 4
2 2

Output:
XX..XX..
XX..XX..
..XX..XX
..XX..XX
Input:
5 5
2 3

Output:
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

Added by:BLANKRK
Date:2015-02-15
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64 JS-MONKEY

hide comments
2018-09-06 17:04:40
Same as AU7_3 .
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.