Crossword puzzle decoration

No attempts yetTime limit1sMemory limit128 MB

Problem

Changyeong likes crossword puzzles. He has solved every puzzle in the world, so now he wants to decorate one.

A puzzle is a grid of M×NM \times N letters. Changyeong adds UU rows above the puzzle, LL columns to its left, RR columns to its right, and DD rows below it. The finished decoration is a rectangle with U+M+DU + M + D rows and L+N+RL + N + R columns.

The added cells are filled with # and . so that they alternate like a chessboard. Let (i,j)(i, j) be the cell in row ii from the top and column jj from the left of the finished rectangle. A cell with i+ji + j even holds #, and a cell with i+ji + j odd holds .. The top left cell (1,1)(1, 1) is therefore #. Cells that the original puzzle occupies keep their letters.

Input

The first line contains MM and NN. (1M,N101 \le M, N \le 10)

The second line contains UU, LL, RR, and DD. (0U,L,R,D50 \le U, L, R, D \le 5)

Each of the next MM lines contains NN letters of the crossword puzzle.

Output

Print the decorated crossword puzzle on U+M+DU + M + D lines. Each line has L+N+RL + N + R characters.