eolymp
bolt
Try our new interface for solving problems
Problems

Create The Scaled Picture

Create The Scaled Picture

Given the picture $n \cdot m$, built from black and white pixels. Your task is to scale it up, replacing each pixel with the rectangle $a \cdot b$, entirely consisting of the pixels of same color as the replaced pixel. \InputFile The first line contains four integers $n, m, a, b~(1 \le n, m, a, b \le 10)$. $i$-th of the following $n$ lines contain the binary string of length $m$, describing $i$-th row of the initial picture. $0$ denotes the white pixel; $1$ denotes the black pixel. \OutputFile Print the scaled picture as the rectangle consisting of $n \cdot a$ rows and $m \cdot b$ columns.
Time limit 1 second
Memory limit 128 MiB
Input example #1
2 2 1 1
10
11
Output example #1
10
11
Input example #2
2 2 2 2
10
11
Output example #2
1100
1100
1111
1111
Input example #3
2 2 2 3
10
11
Output example #3
111000
111000
111111
111111
Source 2022 Azerbaijan ICPC Qualification