n, m, k = map(int, input().split())
t = [tuple(map(int, input().split())) for _ in range(k)]

# Initialize the grid with '*'
res = [['*'] * m for _ in range(n)]
# Record the next available row in each column
next_available_row = [0] * m

# Process each bomb
for x, y in t:
    j = y - 1
    i = next_available_row[j]
    if i < x:  # Ensure we don't go out of bounds
        res[i][j] = '.'
        next_available_row[j] += 1

# Print the resulting grid
for r in res:
    print(''.join(r))