Problem list
Log in
#usaco0245 · USACO 2016-2017 December Bronze

The Cow-Signal

Bronze II 2.0 s 256 MB

Bessie and her cow friends are playing as their favorite cow superheroes. Of course, everyone knows that any self-respecting superhero needs a signal to call them to action. Bessie has drawn a special signal on a sheet of $M \times N$ paper ($1 \leq M \leq 10, 1 \leq N \leq 10$), but this is too small, much too small! Bessie wants to amplify the signal so it is exactly $K$ times bigger ($1 \leq K \leq 10$) in each direction.

The signal will consist only of the '.' and 'X' characters.

Input

The first line of input contains $M$, $N$, and $K$, separated by spaces.

The next $M$ lines each contain a length-$N$ string, collectively describing the picture of the signal.

Output

You should output $KM$ lines, each with $KN$ characters, giving a picture of the enlarged signal.

Example 1

Input
5 4 2
XXX.
X..X
XXX.
X..X
XXX.
Output
XXXXXX..
XXXXXX..
XX....XX
XX....XX
XXXXXX..
XXXXXX..
XX....XX
XX....XX
XXXXXX..
XXXXXX..

Problem credits: Nathan Pinsker

Source
USACO 2016-2017 December Bronze
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code