Fly Swatter

Find the K by K placement that encloses the most flies in its strict interior and print the count with the winning border drawn.

Easy3Prefix sumMatrixBrute forceInterviewNo attempts yetTime limit1sMemory limit64 MB

Problem

Marin spends his free time looking out of the window. A few flies have landed on that window and are staring into the distance. Marin picked up his square fly swatter and wondered how many flies he can kill with a single swing.

The picture of the window is R×SR \times S pixels, and the side of the swatter is KK pixels. Find the largest number of flies that one swing can kill, and mark one swatter position that kills that many flies on the picture.

Input

The first line contains three integers RR, SS and KK, the size of the picture and the side length of the swatter (3KR1003 \le K \le R \le 100, KS100K \le S \le 100).

Each of the next RR lines contains SS characters describing the window. A pixel with a fly on it is *, an empty pixel is .. At least one fly can be killed with the swatter.

Output

On the first line print the largest number of flies that a single swing can kill.

On the next RR lines print the picture with the position of the swatter marked on it. The horizontal sides of the swatter are -, the vertical sides are |, and the four corners are +. These characters overwrite the original pixels.

The swatter must lie completely inside the window. A fly sitting on a side of the swatter has enough time to fly away, so only the flies strictly inside the swatter are killed. With rows and columns counted from 00, a swatter whose top left corner is (i,j)(i, j) kills the flies in rows i+1i+1 through i+K2i+K-2 and columns j+1j+1 through j+K2j+K-2.

If several positions kill the largest number of flies, mark the one whose top left corner has the smallest row index, and among those the one with the smallest column index.