#include using namespace std; struct iofast_t { iofast_t() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); } } iofast; struct uns_t {} uns; template auto vec(Element init, Head arg, Args ...args) { if constexpr (sizeof...(Args) == 0) return std::vector(arg, init); else return std::vector(arg, vec(init, args...)); } template auto vec(uns_t, Head arg, Args ...args) { return vec(Element(), arg, args...); } template > T &chmin(T &l, T r, Compare &&f = less()) { return l = min(l, r, f); } template > T &chmax(T &l, T r, Compare &&f = less()) { return l = max(l, r, f); } optional> solver(int h, int w, int q) { int d = h + w - 2; if (d % 4 != q % 4 || q < d || (h / 2) * (w / 4) < (q - d) / 4) { return nullopt; } // 凸 の数 // w / 4; // 1凸 にいくつのポイントがあるか // h / 2; int use = (q - d) / 4; auto ans = vec(string(w, '#'), h); int x = 0, y = 0; for (int i = 0; i < w / 2; ++i) { for (int j = y; j < h; ++j) { ans[j][x] = '.'; } y = 0; if (w <= ++x) { break; } ans[h - 1][x++] = '.'; if (x == w - 1) { ans[h - 1][x] = '.'; break; } for (int j = 0; j < h && use != 0; j += 2, --use) { ans[h - j - 1][x] = '.'; ans[h - j - 2][x] = '.'; ans[h - j - 3][x] = '.'; if (use == 1) { ans[h - j - 3][x + 1] = '.'; y = h - j - 3; } } x += 2; } for (int i = 1; i <= h; ++i) { for (int j = 1; j <= w; ++j) { if (i % 2 && j % 2) { ans[i - 1][j - 1] = '.'; } } } return ans; } int main() { int h, w, x; cin >> h >> w >> x; auto op1 = solver(h, w, x); auto op2 = solver(w, h, x); if (!op1.has_value() && !op2.has_value()) { cout << -1 << endl; return 0; } if (op1.has_value()) { for (auto e1 : op1.value()) { for (auto e2 : e1) { cout << e2; } cout << endl; } return 0; } auto ans = op2.value(); for (int i = 0; i < h; ++i) { for (int j = 0; j < w; ++j) { cout << ans[j][i]; } cout << endl; } }