#include using namespace std; using ll = long long; template istream& operator >> (istream& is, vector& vec) { for(T& x : vec) is >> x; return is; } template ostream& operator << (ostream& os, const vector& vec) { if(vec.empty()) return os; os << vec[0]; for(auto it = vec.begin(); ++it != vec.end(); ) os << ' ' << *it; return os; } int main(){ ios::sync_with_stdio(false); cin.tie(0); int h, w; ll k; cin >> h >> w >> k; vector y(2 * h), x(2 * w); iota(y.begin(), y.begin() + h, 0); iota(y.rbegin(), y.rbegin() + h, 0); iota(x.begin(), x.begin() + w, 0); iota(x.rbegin(), x.rbegin() + w, 0); k %= 2 * h * w; vector> A(h, vector(w)); for(int i = 0; i < k; i++){ A[y[i % y.size()]][x[i % x.size()]] ^= 1; } for(int y = 0; y < h; y++){ for(int x = 0; x < w; x++){ cout << (A[y][x] ? '#' : '.'); } cout << '\n'; } }