Hot fish-shaped bun

Print the given N by M binary picture mirrored left to right.

Easy1MatrixImplementationNo attempts yetTime limit1sMemory limit32 MB

Problem

Hodori, a first-year student at Korea University, walked past Anam Station and met a street vendor selling fish-shaped buns.

"Hi, hi, hi there, sir! Two fish buns, please."

"You said hi three times, so three fish buns!"

Hodori paid for two buns, got three, and was in a good mood. He pulled one out and took a bite, but it was so hot that he dropped it.

A fish-shaped bun falling to the ground

The bun landed mirrored left to right. Given the shape of the bun before the bite, print the shape it has once it lands.

Input

The first line holds two integers NN and MM separated by a space (0N100 \le N \le 10, 0M100 \le M \le 10).

Each of the next NN lines holds the shape of the bun. A line is a string of MM characters, where 0 is empty space and 1 is part of the bun. When MM is 00, each of those lines is empty.

Output

Print the bun mirrored left to right, on NN lines. When NN is 00, print nothing.

Hint

Reverse each line before printing it. Column 1 of row 1 in the input becomes column MM of row 1 in the output, column 2 of row 1 becomes column M1M-1, and by the same rule column MM of row NN becomes column 1 of row NN.