e-olymp
Problems

Character designs on fabric

Character designs on fabric

Write a program for drawing patterns on the cloth as symbols. The odd lines of the pattern characters are in a row, and even - are separated by a space.

Input

In a single line of input file specified first symbol pattern S, then through the gaps 3 positive integers: the width of the pattern w (odd, w < 80), its height h (h40) and frequency t (t40). In the example, the output gap, for clarity, replaced by a point.

Output

Print the desired pattern.

Time limit 1 second
Memory limit 64 MiB
Input example
Sample 1 
W 7 9 1

Sample 2
E 9 6 2
Output example
Sample 1
WWWWWWW
.W.W.W.W
..WWWWWWW
...W.W.W.W
....WWWWWWW
...W.W.W.W
..WWWWWWW
.W.W.W.W
WWWWWWW

Sample 2
EEEEEEEEE
.E.E.E.E.E
..EEEEEEEEE
..E.E.E.E.E
.EEEEEEEEE
E.E.E.E.E
.EEEEEEEEE
..E.E.E.E.E
..EEEEEEEEE
.E.E.E.E.E
EEEEEEEEE
Source Stage II All-Ukrainian Olympiad 2010-2011 Berdichev