#include<cstdio> constint maxn = 120; bool row[maxn], col[maxn]; int h, w, n; intmain(){ #ifndef LOCAL freopen("kotlin.in", "r", stdin); freopen("kotlin.out", "w", stdout); #endif scanf("%d%d%d", &h, &w, &n); for (int hi = 1; hi <= (h + 1) / 2; hi++) for (int wi = 1; wi <= (w + 1) / 2; wi++) { if (hi * wi == n){ for (int i = 0; i < hi - 1; i++) row[1 + i * 2] = true; for (int i = 0; i < wi - 1; i++) col[1 + i * 2] = true; for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++){ if (row[i] || col[j]) printf("#"); elseprintf("."); } printf("\n"); } return0; } } printf("Impossible\n"); }