import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();
        int n = 0, m = 0, k = 0;
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            n = in.nextInt();
            m = in.nextInt();
            k = in.nextInt();
            char[][] picture = new char[n][m];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    picture[i][j] = '*';
                }
            }
            int[] inds = new int[m];
            for (int a = 0; a < k ; a++) {
                int x = in.nextInt();
                int y = in.nextInt();
                if (picture[x - 1][y - 1] == '*') {
                    int rowToRm = inds[y - 1];
                    picture[rowToRm][y - 1] = '.';
                    inds[y - 1]++;
                }
            }
            for (int i = 0; i < n; i++) {
                System.out.println(new String(picture[i]));
            }
        }
    }
}