eolymp
bolt
Try our new interface for solving problems
Problems

Character designs on fabric

Character designs on fabric

Time limit 1 second
Memory limit 64 MiB

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 (h40) and frequency t (t40). 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
Source Stage II All-Ukrainian Olympiad 2010-2011 Berdichev