As Wikipedia defines it, a “Mandala is a spiritual and ritual symbol in Indian religions, representing the universe.” In India, mandalas are major cultural icons commonly found in clothing, books, architecture and etc.
Source: https://upload.wikimedia.org/wikipedia/commons/1/1d/KalachakraSera.jpg
These ornate illustrations are very hard to make because the symmetry must be perfect and the coloration must match exactly. Artists typically spend years training under a master to draw or weave Mandalas. Because an illustration’s value comes from the complexity it projects to the eye, the creation of a new pattern is extremely tedious and time consuming. As you can probably tell, there is a faster way of making Mandalas using computer programming with just a quarter of a whole mandala. Figure out how!
Input
The input consists of one mandala. The mandala starts with a line with two integers m > 0 and n > 0, which indicates how many rows and columns the mandala quarter has, respectively. This is followed by m lines, each containing n characters, which forms the mandala quarter.
Output
The output consists of the full mandala. A blank line should appear after the mandala.
Sample Input
4 10
----@----*
---@----*-
--@----*-|
~~----*-|+
Sample Output
----@----**----@----
---@----*--*----@---
--@----*-||-*----@--
~~----*-|++|-*----~~
~~----*-|++|-*----~~
--@----*-||-*----@--
---@----*--*----@---
----@----**----@----