Sapper#4105

Sapper

1 second
64 megabytes
Very easy

On the weekend, you decided to create your first computer game and chose to start with something simple: "Minesweeper."

"Minesweeper" is a single-player game set on a grid of N \times M cells. Mines are hidden in of these cells. In the other cells, a number from to may be displayed, indicating the number of mines in the adjacent cells. If there are no mines nearby, the cell remains blank. Cells are considered adjacent if they share at least one point. Each cell can contain at most one mine.

You've already developed a module to place mines on the game board. Your next task is to generate the game map according to these rules.

Input

The first line contains three integers , , (1 \le N \le 50, 1 \le M \le 50, 0 \le K \le N \cdot M). The next lines each contain two integers that specify the coordinates of the mines. The first integer indicates the row number, and the second indicates the column number. The top-left cell is at coordinates , and the bottom-right cell is at coordinates (N, M).

Output

You must output a matrix with rows and columns representing the "Minesweeper" map.

The -th character of the -th row should be "*" if there is a mine in cell , a digit from to if there is a corresponding number in this cell, or "." if the cell is empty.

Examples

Example 1

Loading
Loading