#B3918. Image Enlargement

    ID: 11575 Type: Default 1000ms 256MiB

Image Enlargement

Image Enlargement

Given an image consisting of nn rows and mm columns, where the character in the ii-th row and jj-th column is denoted as si,js_{i,j}, your task is to enlarge the image by a factor of kk. That is, each character is replaced by a k×kk\times k block filled with that character, so that the resulting image has knkn rows and kmkm columns.

For example, if you are given the following 4×34\times3 image:
( \begin{array}{ccc} % & % & % \ & & $ \\ @ & w & @ \\ ! & ! & ! \\ \end{array} \)
and $k=2$, the enlarged image will be:
\( \begin{array}{cccccc} % & % & % & % & % & % \\ % & % & % & % & % & % \\ $ & & & & & \\ & & & & & $ \ @ & @ & w & w & @ & @ \ @ & @ & w & w & @ & @ \ ! & ! & ! & ! & ! & ! \ ! & ! & ! & ! & ! & ! \ \end{array} )
Your program needs to produce this enlarged image based on the given inputs.

inputFormat

The input consists of multiple lines. The first line contains three integers nn, mm, and kk (1n,m1001 \leq n, m \leq 100, 1k101 \leq k \leq 10), representing the number of rows, the number of columns of the image, and the enlargement factor respectively. Each of the following nn lines contains a string of length mm, representing a row of the image.

outputFormat

Output the enlarged image with knkn rows and kmkm columns. Each character from the original image is expanded into a k×kk\times k block, and the blocks are printed in the same order as the original image rows.

sample

4 3 2
%%%
$$$
@w@
!!!
%%%%%%

%%%%%%

$$ $$

@@ww@@ @@ww@@ !!!!!! !!!!!!

</p>