#pragma GCC optimize ("O2") #pragma GCC target ("avx2") #include //#include //using namespace atcoder; using namespace std; typedef long long ll; #define rep(i, n) for(int i = 0; i < (n); i++) #define rep1(i, n) for(int i = 1; i <= (n); i++) #define co(x) cout << (x) << "\n" #define cosp(x) cout << (x) << " " #define ce(x) cerr << (x) << "\n" #define cesp(x) cerr << (x) << " " #define pb push_back #define mp make_pair #define chmin(x, y) x = min(x, y) #define chmax(x, y) x = max(x, y) #define Would #define you #define please bool kotae[1000][1000]; int main() { cin.tie(0); ios::sync_with_stdio(false); int H, W, X; cin >> H >> W >> X; int mi = H + W - 2; int ma = mi + (H / 2) * (W / 2) / 2 * 4; if (X < mi || ma < X || (X - mi) % 4) { co(-1); return 0; } int K = (X - mi) / 4; for (int i = 1; i < H; i += 2) rep(j, W - 1) { kotae[i][j] = 1; } for (int i = 3; i < H; i += 4) { for (int j = W - 3; j >= 0; j -= 2) { if (K) { kotae[i][j] = 0; kotae[i][j + 2] = 1; K--; } } } for (int j = W - 2; j >= 3; j -= 4) { if (K) { kotae[H - 1][j] = 1; kotae[H - 2][j - 1] = 0; kotae[H - 3][j - 2] = 1; kotae[H - 2][j - 3] = 0; K--; } } rep(i, H) { rep(j, W) { cout << (kotae[i][j] ? '#' : '.'); } cout << '\n'; } Would you please return 0; }