#include using namespace std; int main() { int h, w, x; cin >> h >> w >> x; int hhalf = h / 2, whalf = w / 2, rest = x / 2 - hhalf - whalf, longest = (hhalf + 1) * (whalf + 1) - 1; if (x % 2 or x / 2 % 2 != (hhalf + whalf) % 2 or rest < 0 or longest < x / 2) { cout << -1 << endl; return 0; } vector ans(h); for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { ans.at(i).push_back('.'); if (i % 2 and j % 2) { ans.at(i).at(j) = '#'; } } } if (hhalf % 2 == 0) { int prevhole = 0; for (int i = 1; i < h; i += 2) { int hole = 2 * whalf; if (rest >= prevhole and prevhole) { hole = 0; rest -= prevhole; } else if (rest and prevhole) { hole = prevhole - rest; rest = 0; } prevhole = hole; for (int j = 0; j < w; j += 2) { if (j != hole) { ans.at(i).at(j) = '#'; } } } } else if (whalf % 2 == 0) { int prevhole = 0; for (int i = 1; i < w; i += 2) { int hole = 2 * hhalf; if (rest >= prevhole and prevhole) { hole = 0; rest -= prevhole; } else if (rest and prevhole) { hole = prevhole - rest; rest = 0; } prevhole = hole; for (int j = 0; j < h; j += 2) { if (j != hole) { ans.at(j).at(i) = '#'; } } } } else { int prevhole = 0; for (int i = 1; i < h; i += 2) { int hole = 2 * whalf; if (i >= h - 2 and rest) { break; } if (rest >= prevhole and prevhole) { hole = 0; rest -= prevhole; } else if (rest and prevhole) { hole = prevhole - rest; rest = 0; } prevhole = hole; for (int j = 0; j < w; j += 2) { if (j != hole) { ans.at(i).at(j) = '#'; } } } if (rest) { prevhole = h - 3; for (int i = 1; i < w; i += 2) { int hole = h - 3; if (rest and prevhole == h - 3) { hole = h - 1; rest -= 2; } prevhole = hole; ans.at(2 * h - 4 - hole).at(i) = '#'; } } } for (auto &&s : ans) { cout << s << '\n'; } return 0; }