import java.io.PrintWriter; import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int h = sc.nextInt(); int w = sc.nextInt(); int x = sc.nextInt(); sc.close(); char[][] s = null; if (h % 4 == 3 && w % 4 == 3) { int max = h * (w / 2 + 1) + (w / 2) - 1; if (h % 4 == 3 && w % 4 == 3) { max -= Math.min(h, w) - 1; } if (x <= max) { s = solve(h, w, x); } else { if (h <= w) { int w2 = w - 2; max = h * (w2 / 2 + 1) + (w2 / 2) - 1; char[][] s1 = solve(h, w - 2, max); char[][] s2 = solve(h, 3, x - max + h - 1); if (s2 == null) { System.out.println(-1); return; } s = new char[h][w]; for (int i = 0; i < h; i++) { for (int j = 0; j < w2; j++) { s[i][j] = s1[i][j]; } for (int j = 0; j < 3; j++) { s[i][w2 - 1 + j] = s2[i][j]; } } } else { int h2 = h - 2; max = w * (h2 / 2 + 1) + (h2 / 2) - 1; char[][] s1 = solve(h - 2, w, max); char[][] s2 = solve(3, w, x - max + w - 1); if (s2 == null) { System.out.println(-1); return; } s = new char[h][w]; for (int j = 0; j < w; j++) { for (int i = 0; i < h2; i++) { s[i][j] = s1[i][j]; } for (int i = 0; i < 3; i++) { s[h2 - 1 + i][j] = s2[i][j]; } } } } } else { s = solve(h, w, x); } if (s == null) { System.out.println(-1); return; } PrintWriter pw = new PrintWriter(System.out); for (int i = 0; i < h; i++) { pw.println(s[i]); } pw.flush(); } static char[][] solve(int h, int w, int x) { int min = h + w - 2; int max = h * (w / 2 + 1) + (w / 2) - 1; if (h % 4 == 3 && w % 4 == 3) { max -= Math.min(h, w) - 1; } int y = max - x; if (x < min || max < x || y % 4 != 0) { return null; } y /= 4; char[][] s = new char[h][w]; for (int i = 0; i < h; i++) { Arrays.fill(s[i], '.'); } for (int i = 1; i < h; i += 2) { for (int j = 1; j < w; j += 2) { s[i][j] = '#'; } } boolean tate = true; if (w % 4 == 3) { if (h % 4 == 1 || h > w) { tate = false; } } if (tate) { tate(s, h, w, y); } else { yoko(s, h, w, y); } return s; } static void tate(char[][] s, int h, int w, int y) { for (int j = 1; j < w; j += 4) { s[0][j] = '#'; } for (int i = 2; i < h - 1; i += 2) { for (int j = 1; j < w; j += 2) { s[i][j] = '#'; } } for (int j = 3; j < w; j += 4) { s[h - 1][j] = '#'; } int i = h - 1; int j = 1; for (int k = 0; k < y; k++) { s[i][j] = '#'; s[i - 2][j] = '.'; i -= 2; if (i < 2) { i = h - 1; j += 4; } } } static void yoko(char[][] s, int h, int w, int y) { for (int i = 1; i < h; i += 4) { s[i][0] = '#'; } for (int j = 2; j < w - 1; j += 2) { for (int i = 1; i < h; i += 2) { s[i][j] = '#'; } } for (int i = 3; i < h; i += 4) { s[i][w - 1] = '#'; } int j = w - 1; int i = 1; for (int k = 0; k < y; k++) { s[i][j] = '#'; s[i][j - 2] = '.'; j -= 2; if (j < 2) { j = w - 1; i += 4; } } } }