#P12172. Draw an L-shaped Pattern

    ID: 14275 Type: Default 1000ms 256MiB

Draw an L-shaped Pattern

Draw an L-shaped Pattern

Little Lan wants to draw a pattern for Lanqiao using the uppercase letter Q to form an L shape. Due to his limited drawing skills, he wants the L shape to have the following properties:

  • The thickness of the strokes is exactly w characters.
  • The vertical stroke spans h rows on top. Thus, the overall height of the pattern is h+w.
  • The horizontal stroke spans v columns to the right. Thus, the overall width of the horizontal part is v+w.
  • There is no extra content in each stroke; they are both solid rectangles of Q's.

In other words, the pattern consists of two parts:

  1. The first h rows: each row is a rectangle of size w (width) formed by the vertical stroke.
  2. The last w rows: each row is a rectangle of size v+w (width) formed by the horizontal stroke.

For example, if w = 2, h = 3, and v = 4, the output should be:

QQ
QQ
QQ
QQQQQQ
QQQQQQ

Note that there is no extra spaces or characters in the output.

inputFormat

The input consists of three integers w, h, and v separated by spaces.

1 \leq w, h, v \leq 100

outputFormat

Print the L-shaped pattern as described. The first h rows each contain exactly w characters Q, and the following w rows each contain exactly v+w characters Q.

sample

2 3 4
QQ

QQ QQ QQQQQQ QQQQQQ

</p>