#B3918. Image Enlargement
Image Enlargement
Image Enlargement
Given an image consisting of rows and columns, where the character in the -th row and -th column is denoted as , your task is to enlarge the image by a factor of . That is, each character is replaced by a block filled with that character, so that the resulting image has rows and columns.
For example, if you are given the following 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 , , and (, ), representing the number of rows, the number of columns of the image, and the enlargement factor respectively. Each of the following lines contains a string of length , representing a row of the image.
outputFormat
Output the enlarged image with rows and columns. Each character from the original image is expanded into a block, and the blocks are printed in the same order as the original image rows.
sample
4 3 2
%%%
$$$
@w@
!!!
%%%%%%
%%%%%%
$$
$$
@@ww@@
@@ww@@
!!!!!!
!!!!!!
</p>