#include using namespace std; using ll = long long; using ld = long double; //constexpr ll MOD = 1e9 + 7; constexpr ll MOD = 998244353; //constexpr ll MOD = ; ll mod(ll A, ll M) {return (A % M + M) % M;} constexpr ll INF = 1LL << 60; template bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;} template bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return false;} ll divceil(ll A, ll B) {return (A + (B - 1)) / B;} #define FINALANS(A) do {cout << (A) << '\n'; exit(0);} while (false) int main() { ll H, W, X; cin >> H >> W >> X; if (X % 2 == 1) FINALANS(-1); ll h = (H + 1) / 2, w = (W + 1) / 2, x = X / 2; vector S(H, string(W, '#')); if (h % 2 == 0 && w % 2 == 0) { if (!(h + w - 2 <= x && x <= h * w - 1)) FINALANS(-1); if ((x - (h + w - 2)) % 2 != 0) FINALANS(-1); for (ll i = 0; i < H; i++) { S.at(i).at(0) = '.'; } for (ll j = 0; j < W; j++) { S.at(H - 1).at(j) = '.'; } ll cnt = 0; for (ll i = 0; i + 2 < H - 1; i += 4) { for (ll j = 0; j + 2 < W; j += 2) { if (cnt == (x - (h + w - 2)) / 2) goto FIN; S.at(i).at(j + 1) = '.', S.at(i).at(j + 2) = '.'; S.at(i + 1).at(j) = '#', S.at(i + 1).at(j + 2) = '.'; S.at(i + 2).at(j + 1) = '.', S.at(i + 2).at(j + 2) = '.'; cnt++; } } for (ll j = 2; j + 2 < W; j += 4) { if (cnt == (x - (h + w - 2)) / 2) goto FIN; S.at(H - 3).at(j) = '.', S.at(H - 2).at(j) = '.'; S.at(H - 3).at(j + 1) = '.', S.at(H - 1).at(j + 1) = '#'; S.at(H - 3).at(j + 2) = '.', S.at(H - 2).at(j + 2) = '.'; cnt++; } if (cnt == (x - (h + w - 2)) / 2) goto FIN; } else { if (!(h + w - 2 <= x && x <= h * w)) FINALANS(-1); if ((x - (h + w - 2)) % 2 != 0) FINALANS(-1); if (h % 2 != 0) { for (ll i = 0; i < H; i++) { S.at(i).at(0) = '.'; } for (ll j = 0; j < W; j++) { S.at(H - 1).at(j) = '.'; } ll cnt = 0; for (ll i = 0; i + 2 < H; i += 4) { for (ll j = 0; j + 2 < W; j += 2) { if (cnt == (x - (h + w - 2)) / 2) goto FIN; S.at(i).at(j + 1) = '.', S.at(i).at(j + 2) = '.'; S.at(i + 1).at(j) = '#', S.at(i + 1).at(j + 2) = '.'; S.at(i + 2).at(j + 1) = '.', S.at(i + 2).at(j + 2) = '.'; cnt++; } } if (cnt == (x - (h + w - 2)) / 2) goto FIN; } else { for (ll i = 0; i < H; i++) { S.at(i).at(W - 1) = '.'; } for (ll j = 0; j < W; j++) { S.at(0).at(j) = '.'; } ll cnt = 0; for (ll j = 0; j + 2 < W; j += 4) { for (ll i = 0; i + 2 < H; i += 2) { if (cnt == (x - (h + w - 2)) / 2) goto FIN; S.at(i + 1).at(j) = '.', S.at(i + 2).at(j) = '.'; S.at(i).at(j + 1) = '#', S.at(i + 2).at(j + 1) = '.'; S.at(i + 1).at(j + 2) = '.', S.at(i + 2).at(j + 2) = '.'; cnt++; } } if (cnt == (x - (h + w - 2)) / 2) goto FIN; } FIN: for (ll i = 0; i < H; i++) { cout << S.at(i) << endl; } //cerr << (h + w - 1) << " " << x << endl; } }