VK Cup 2015 - Qualification Round 2
A
Rotate, Flip and Zoom
Codeforces
1200
原题
←B →
翻译中…

Polycarp is writing the prototype of a graphic editor. He has already made up his mind that the basic image transformations in his editor will be: rotate the image 90 degrees clockwise, flip the image horizontally (symmetry relative to the vertical line, that is, the right part of the image moves to the left, and vice versa) and zooming on the image. He is sure that that there is a large number of transformations that can be expressed through these three.

翻译中…

He has recently stopped implementing all three transformations for monochrome images. To test this feature, he asked you to write a code that will consecutively perform three actions with a monochrome image: first it will rotate the image 90 degrees clockwise, then it will flip the image horizontally and finally, it will zoom in twice on the image (that is, it will double all the linear sizes).

翻译中…

Implement this feature to help Polycarp test his editor.

翻译中…

Input

翻译中…

The first line contains two integers, $*w*$ and $*h*$ ($1 ≤ *w*, *h* ≤ 100$) — the width and height of an image in pixels. The picture is given in $*h*$ lines, each line contains $*w*$ characters — each character encodes the color of the corresponding pixel of the image. The line consists only of characters "." and "*", as the image is monochrome.

翻译中…

Output

翻译中…

Print $2*w*$ lines, each containing $2*h*$ characters — the result of consecutive implementing of the three transformations, described above.

翻译中…

样例

Input #1
3 2
.*.
.*.
Output #1
....
....
****
****
....
....
InputCopy OutputCopy
Input #2
9 20
**.......
****.....
******...
*******..
..******.
....****.
......***
*.....***
*********
*********
*********
*********
....**...
...****..
..******.
.********
****..***
***...***
**.....**
*.......*
Output #2
********......**********........********
********......**********........********
********........********......********..
********........********......********..
..********......********....********....
..********......********....********....
..********......********..********......
..********......********..********......
....********....****************........
....********....****************........
....********....****************........
....********....****************........
......******************..**********....
......******************..**********....
........****************....**********..
........****************....**********..
............************......**********
............************......**********
InputCopy OutputCopy
题目信息
题号
523A
时间限制
2 s
内存限制
256 MB
标签
*special
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。