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 data
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 (h ≤ 40) and frequency t (t ≤ 40). In the example, the output gap, for clarity, replaced by a point.
Output data
Print the desired pattern.
Examples
Input example #1
W 7 9 1
Output example #1
WWWWWWW W W W W WWWWWWW W W W W WWWWWWW W W W W WWWWWWW W W W W WWWWWWW
Input example #2
E 9 6 2
Output example #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