A large portion of the Olympic broadcasts from Vancouver focused on curling, which led to its increasing popularity in Europe. In curling, granite stones are played with the goal of placing them closer to the center of the house than the opponent's stones. In official matches, all stones are of the same size. However, few people know that in training, stones of various diameters are used, allowing athletes to improve different aspects of their skills.
During training, equipment is used to photograph the positions of the stones from above. This data is later used to analyze errors in the throws. Information is best processed if all throws are displayed in one image by superimposing them. Based on the given information about the locations of the stones on the ice, you need to obtain such a photograph.
The photograph is a rectangle with size N \times M cells. Each stone in the photo is represented by a circle centered at a certain cell and with a radius that is an integer number of cells. In the photograph, all cells (X, Y) within the -th circle, whose coordinates satisfy the inequality (X_0 - X)^2 + (Y_0 - Y)^2 \leq R^2, are painted with color C_i. Here, X_0, Y_0 are the coordinates of the center of the circle.
It is clear that after sequentially superimposing the images of all the stones, some cells may be painted multiple times; in this case, the color of the cell is the last color it was painted with. Other cells may remain completely unpainted.
The first line contains the numbers , , (3 \leq N, M \leq 2500, 1 \leq K \leq 5000). Each of the following lines contains information about the placement of stones on the field: X_i, Y_i, R_i, C_i (0 \leq X_i < N, 0 \leq Y_i < M, 1 \leq R < \max(N, M)). Color is specified by a single letter of the Latin alphabet. Uppercase and lowercase letters are considered different.
Print rows of characters, which represents the photograph of all stones. An unpainted cell should be denoted by a dot. A painted cell should be denoted by its color character.
An example of the output is shown in the figure:

Example 1