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.
\InputFile
In a single line of input file specified first symbol pattern \textbf{S}, then through the gaps \textbf{3} positive integers: the width of the pattern \textbf{w} (odd, \textbf{w} < \textbf{80}), its height \textbf{h} (\textbf{h} ≤ \textbf{40}) and frequency \textbf{t} (\textbf{t} ≤ \textbf{40}). In the example, the output gap, for clarity, replaced by a point.
\OutputFile
Print the desired pattern.
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