Joon-Pyo decorated a flowerbed in front of his home. The flowerbed is in the shape of an n×m grid, and one flower is planted in each cell. There are 26 colors, one corresponding to each uppercase letter from A to Z. Suddenly, he wanted to redecorate the flowerbed.

The flowerbed is too large to adjust the flowers one by one. He rented some equipment that can lift and rotate a square plot of land with a side length of d. He planned the construction in the following order, expecting the flowerbed to be properly redecorated.
Note that the equipment will never go out of the flowerbed, as x, y, and d are carefully determined before construction begins.
He cannot start construction without knowing the outcome. Write a program that outputs the result.
On the first line, five integers n, m, y, x, and d are given. (1≤n×m≤106, 1≤y≤n, 1≤x≤m, 1≤d≤min(n,m), n≡d(mody), m≡d(modx)).
Each of the next n lines contains exactly m uppercase letters, the current flowerbed.
Output n lines, each containing m uppercase letters, the flowerbed after the planned construction.
In the first example, the flowerbed changes as follows:
