#include using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define ALL(v) begin(v),end(v) template inline bool chmax(A & a, const B & b) { if (a < b) { a = b; return true; } return false; } template inline bool chmin(A & a, const B & b) { if (a > b) { a = b; return true; } return false; } using ll = long long; using pii = pair; constexpr ll INF = 1ll<<30; constexpr ll longINF = 1ll<<60; constexpr ll MOD = 1000000007; constexpr bool debug = false; //---------------------------------// int main() { int H, W, X; cin >> H >> W >> X; int h = (H + 1) / 2, w = (W + 1) / 2; if (X % 2 == 1 || (h + w) % 2 != X / 2 % 2) { puts("-1"); return 0; } X /= 2; bool trans = false; if (h % 2 == 0) { trans = true; swap(H, W); swap(h, w); } constexpr int dx[] {-1,0,1,0}, dy[] {0,-1,0,1}; // lurd ^1 で転置 vector dirs; // (h, w) = (odd, even) or (even, even) if (h + w - 2 > X || h * w - 1 < X || ((~(h | w) & 1) && h * w - 1 == X)) { puts("-1"); return 0; } X -= h + w - 2; REP(i, (h - 1) / 2) { // rrr d lll d const int cur = min(X / 2, w - 1); REP(j, cur) dirs.emplace_back(2); dirs.emplace_back(3); REP(j, cur) dirs.emplace_back(0); dirs.emplace_back(3); X -= cur * 2; } if (h & 1) REP(i, w - 1) dirs.emplace_back(2); // r else { REP(i, X / 2) { dirs.emplace_back(3); // d dirs.emplace_back(2); // r dirs.emplace_back(1); // u } REP(i, w - 1 - X / 2) dirs.emplace_back(2); // r dirs.emplace_back(3); // d } if (trans) { for (int & a : dirs) a ^= 1; swap(H, W); swap(h, w); } vector ans(H, string(W, '#')); REP(i, h) REP(j, w) ans[i << 1][j << 1] = '.'; int y = 0, x = 0; for (int dir : dirs) { ans[y + dy[dir]][x + dx[dir]] = '.'; y += 2 * dy[dir]; x += 2 * dx[dir]; } REP(i, H) cout << ans[i] << '\n'; }