#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define rep(i, init, end) for(ll i = init; i < end; i++) #define REP(i, init, end) for(ll i = init; i < end + 1; i++) #define rev(i, end, init) for(ll i = init - 1; i >= end; i--) #define REV(i, end, init) for(ll i = init; i >= end; i--) #define PI 3.14159265359 #define EPS 0.0000000001 // #define MOD 1000000007 //cout << std::fixed << std::setprecision(15) << y << endl; char m[1001][1001]; int main(){ ll H, W, X; cin >> H >> W >> X; ll rowPillar, colPillar; rowPillar = (H - 1) / 2; colPillar = (W - 1) / 2; ll minMove, maxMove; minMove = W - 1 + H - 1; if(rowPillar % 2 == 0){ maxMove = minMove + colPillar * (rowPillar / 2) * 4; }else{ if(colPillar % 2 == 0){ maxMove = minMove + rowPillar * (colPillar / 2) * 4; }else{ maxMove = minMove + ((rowPillar - 1) * colPillar / 2 + (colPillar - 1) / 2) * 4; } } if(X < minMove || X > maxMove || (X - minMove) % 4 != 0){ cout << -1 << endl; return 0; } rep(i, 0, H){ rep(j, 0, W){ if(i % 2 == 1 && j % 2 == 1){ m[i][j] = '#'; }else{ m[i][j] = '.'; } } } ll needDetour = (X - minMove) / 4;//cout << "need: " << needDetour << endl; ll rowCount, colCount; ll r = 0, c = 0; if(rowPillar % 2 == 0){ while(r < rowPillar - 1){ while(c < colPillar){ if(needDetour > 0){ m[2 * r + 1][2 * c] = '#'; m[2 * r + 3][2 * c + 2] = '#'; needDetour--; }else{ m[2 * r][2 * c + 1] = '#'; m[2 * r + 2][2 * c + 1] = '#'; } c++; } r += 2; c = 0; } }else{ if(colPillar % 2 == 0){ while(c < colPillar - 1){ while(r < rowPillar){ if(needDetour > 0){ m[2 * r][2 * c + 1] = '#'; m[2 * r + 2][2 * c + 3] = '#'; needDetour--; }else{ m[2 * r + 1][2 * c] = '#'; m[2 * r + 1][2 * c + 2] = '#'; } r++; } c += 2; r = 0; } }else{ while(r < rowPillar - 1){ while(c < colPillar){ if(needDetour > 0){ m[2 * r + 1][2 * c] = '#'; m[2 * r + 3][2 * c + 2] = '#'; needDetour--; }else{ m[2 * r][2 * c + 1] = '#'; m[2 * r + 2][2 * c + 1] = '#'; } c++; } r += 2; c = 0; } while(c < colPillar){ if(needDetour > 0){ m[2 * r][2 * c + 1] = '#'; m[2 * r + 2][2 * c + 3] = '#'; needDetour--; }else{ m[2 * r][2 * c + 1] = '#'; m[2 * r][2 * c + 1] = '#'; } c += 2; } } } rep(i, 0, H){ rep(j, 0, W){ cout << m[i][j]; } cout << endl; } return 0; }