#ifdef _DEBUG #define _GLIBCXX_DEBUG #endif #include using namespace std; #define GET4(_1,_2,_3,NAME,...) NAME #define GET5(_1,_2,_3,_4,NAME,...) NAME #define GET6(_1,_2,_3,_4,_5,NAME,...) NAME #define GET11(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,NAME,...) NAME #define rep1(i, n) for(long long i=0;i<(long long)(n);i++) #define rep2(i,k,n) for(long long i=k;i<(long long)(n);i++) #define rep3(i,k,n,s) for(long long i=k;i<(long long)(n);i+=(s)) #define rep(...) GET5(__VA_ARGS__, rep3, rep2, rep1)(__VA_ARGS__) #define per1(i,n) for(long long i=(n)-1ll;i>-1ll;i--) #define per2(i,k,n) for(long long i=(n)-1ll;i>(long long)(k)-1ll;i--) #define per3(i,k,n,s) for(long long i=(n)-1ll;i>(long long)(k)-1ll;i-=(s)) #define per(...) GET5(__VA_ARGS__, per3, per2, per1)(__VA_ARGS__) #define perm(c) sort(all(c));for(bool c##p=1;c##p;c##p=next_permutation(all(c))) #define pb emplace_back #define lb(v,k) (lower_bound(all(v),(k))-v.begin()) #define ub(v,k) (upper_bound(all(v),(k))-v.begin()) #define fi first #define se second #define dame(...) {out(__VA_ARGS__);return 0;} #define decimal cout<> (n0); #define readi2(n0,n1) ll n0,n1; cin >> (n0) >> (n1); #define readi3(n0,n1,n2) ll n0,n1,n2; cin >> (n0) >> (n1) >> (n2); #define readi4(n0,n1,n2,n3) ll n0,n1,n2,n3; cin >> (n0) >> (n1) >> (n2) >> (n3); #define readi5(n0,n1,n2,n3,n4) ll n0,n1,n2,n3,n4; cin >> (n0) >> (n1) >> (n2) >> (n3) >> (n4); #define readi6(n0,n1,n2,n3,n4,n5) ll n0,n1,n2,n3,n4,n5; cin >> (n0) >> (n1) >> (n2) >> (n3) >> (n4) >> (n5); #define readi7(n0,n1,n2,n3,n4,n5,n6) ll n0,n1,n2,n3,n4,n5,n6; cin >> (n0) >> (n1) >> (n2) >> (n3) >> (n4) >> (n5) >> (n6); #define readi8(n0,n1,n2,n3,n4,n5,n6,n7) ll n0,n1,n2,n3,n4,n5,n6,n7; cin >> (n0) >> (n1) >> (n2) >> (n3) >> (n4) >> (n5) >> (n6) >> (n7); #define readi9(n0,n1,n2,n3,n4,n5,n6,n7,n8) ll n0,n1,n2,n3,n4,n5,n6,n7,n8; cin >> (n0) >> (n1) >> (n2) >> (n3) >> (n4) >> (n5) >> (n6) >> (n7) >> (n8); #define readi10(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9) ll n0,n1,n2,n3,n4,n5,n6,n7,n8,n9; cin >> (n0) >> (n1) >> (n2) >> (n3) >> (n4) >> (n5) >> (n6) >> (n7) >> (n8) >> (n9); #define readi(...) GET11(__VA_ARGS__, readi10, readi9, readi8, readi7, readi6, readi5, readi4, readi3, readi2, readi1)(__VA_ARGS__) #define readll(...) readi(__VA_ARGS__) #define readvi1(v,n) vi v(n); rep(i,(n)) cin >> (v)[i]; #define readvi2(v,w,n) vi v(n),w(n); rep(i,(n)) cin >> (v)[i] >> (w)[i]; #define readvi3(v,w,x,n) vi v(n),w(n),x(n); rep(i,(n)) cin >> (v)[i] >> (w)[i] >> (x)[i]; #define readvi4(v,w,x,y,n) vi v(n),w(n),x(n),y(n); rep(i,(n)) cin >> (v)[i] >> (w)[i] >> (x)[i] >> (y)[i]; #define readvi(...) GET6(__VA_ARGS__, readvi4, readvi3, readvi2, readvi1)(__VA_ARGS__) #define readvll(...) readvll(__VA_ARGS__) #define reads1(n) string n; cin >> (n); #define reads2(n,m) string n,m; cin >> (n) >> (m); #define reads3(n,m,l) string n,m,l; cin >> (n) >> (m) >> (l); #define reads4(n,m,l,k) string n,m,l,k; cin >> (n) >> (m) >> (l) >> (k); #define reads(...) GET5(__VA_ARGS__, reads4, reads3, reads2, reads1)(__VA_ARGS__) #define readvs(v,n) vs v(n); rep(i,(n)) cin >> (v)[i]; #define readd1(n) ld n; cin >> (n); #define readd2(n,m) ld n,m; cin >> (n) >> (m); #define readd3(n,m,l) ld n,m,l; cin >> (n) >> (m) >> (l); #define readd4(n,m,l,k) ld n,m,l,k; cin >> (n) >> (m) >> (l) >> (k); #define readd(...) GET5(__VA_ARGS__, readd4, readd3, readd2, readd1)(__VA_ARGS__) #define readvvi(v,n,m) vvi v((n),vi(m)); rep(i,(n))rep(j,(m)) cin >> (v)[i][j]; #define readvvs(v,n,m) vvs v((n),vs(m)); rep(i,(n))rep(j,(m)) cin >> (v)[i][j]; #define readvpi(v,n) vpi v(n); rep(i,(n)) cin >> (v)[i].fi >> (v)[i].se; #define readg(G,n,m) vvi G(n);rep(i,m){readi(a,b);a--;b--;G[a].push_back(b);G[b].push_back(a);} #define readgd(G,n,m) vvi G(n);rep(i,m){readi(a,b);a--;b--;G[a].push_back(b);} #define readgdrev(G,n,m) vvi G(n);rep(i,m){readi(a,b);a--;b--;G[b].push_back(a);} #define readt(G,n) vvi G(n);rep(i,n-1){readi(a,b);a--;b--;G[a].push_back(b);G[b].push_back(a);} #define sz(a) ((ll)(a).size()) using ll = long long; using ull = unsigned long long; using ld = long double; template using P = pair; template using PP = tuple; template using PPP = tuple; using pi = P; using ppi = PP; using pppi = PPP; using pll = P; using ppll = PP; using pppll = PPP; template using V = vector; template using VV = vector>; template using VVV = vector>>; template using VVVV = vector>>>; using vi=V; using vvi=VV; using vvvi=VVV; using vvvvi=VVVV; using vll=V; using vvll=VV; using vvvll=VVV; using vvvvll=VVVV; using vpi=V; using vvpi=VV; using vppi=V; using vvppi=VV; using vpppi=V; using vvpppi=VV; using vpll=V; using vvpll=VV; using vppll=V; using vvppll=VV; using vpppll=V; using vvpppll=VV; using vb=V; using vvb=VV; using vs=V; using vvs=VV; const ll inf=(1 << 30); const ll Inf=((ll)1 << 40); const ll INf=((ll)1 << 50); const ll INF=((ll)1 << 60); const double eps=1e-10; template using PQ = priority_queue; template using SPQ = priority_queue,greater>; ///////////////////////////////////////////////////////// using lll = __int128_t; using ulll = __uint128_t; const lll infinf=((lll)1 << 65); const lll Infinf=((lll)1 << 75); const lll INfinf=((lll)1 << 85); const lll INFinf=((lll)1 << 95); const lll INFInf=((lll)1 << 105); const lll INFINf=((lll)1 << 115); const lll INFINF=((lll)1 << 125); istream &operator>>(istream &is, lll& v) { string s; is >> s; v = 0; for(char c:s){if(isdigit(c))v=v*10+(c-'0');} if(s[0]=='-') v*=-1; return is; } ostream &operator<<(ostream &os, lll v) { if(!ostream::sentry(os)) return os; char buf[64]; char *d=end(buf); ulll tmp = (v<0?-v:v); do{d--;*d=char(tmp%10+'0');tmp/=10;}while(tmp); if(v<0) {d--;*d = '-';} int len=end(buf)-d; if(os.rdbuf()->sputn(d, len)!=len){os.setstate(ios_base::badbit);} return os; } istream &operator>>(istream &is, ulll& v) { string s; is >> s; v = 0; for(char c:s){if(isdigit(c))v=v*10+(c-'0');} return is; } ostream &operator<<(ostream &os, ulll v) { if(!ostream::sentry(os)) return os; char buf[64]; char *d=end(buf); do{d--;*d=char(v%10+'0');v/=10;}while(v); int len=end(buf)-d; if(os.rdbuf()->sputn(d, len)!=len){os.setstate(ios_base::badbit);} return os; } ////////////////////////////////////////////////////////// template ostream &operator<<(ostream &os, vector>> v); template ostream &operator<<(ostream &os, vector> v); template istream &operator>>(istream &is, vector& v); template ostream &operator<<(ostream &os, vector v); template istream &operator>>(istream &is, pair& p); template ostream &operator<<(ostream &os, pair p); template istream &operator>> (istream &is, tuple& p); template ostream &operator<< (ostream &os, tuple p); template ostream &operator<<(ostream &os, set s); template ostream &operator<<(ostream &os, multiset s); template ostream &operator<<(ostream &os, map m); template ostream &operator<<(ostream &os, multimap m); template ostream &operator<<(ostream &os, queue qu); template ostream &operator<<(ostream &os, stack st); template ostream &operator<<(ostream &os, priority_queue qu); ////////////////////////////////////////////////////////// ostream &operator<<(ostream &os, vector v){for(bool x : v) os << x; return os;} ostream &operator<<(ostream &os, vector> v){for(vector&x : v) os << x << "\n"; return os;} template ostream &operator<<(ostream &os, vector>> v){for(vector> &w : v)for(vector &x : w) os << x << "\n"; return os;} template ostream &operator<<(ostream &os, vector> v){for(vector &x : v) os << x << "\n"; return os;} template istream &operator>>(istream &is, vector& v){for(T &x : v) is >> x; return is;} template ostream &operator<<(ostream &os, vector v){for(T &x : v) os << x << " "; return os;} template istream &operator>>(istream &is, pair& p){is >> p.fi >> p.se; return is;} template ostream &operator<<(ostream &os, pair p){if(&os == &cerr) return os << "(" << p.fi << "," << p.se << ")"; else return os << p.fi << " " << p.se;} template arraytuple_cin(istream &is, Tuple&& t, index_sequence){return {{ (void(is >> get(t)), 0)... }};} template istream &operator>> (istream &is, tuple& p){tuple_cin(is, p, make_index_sequence>>::value>{}); return is;} template arraytuple_cout(ostream &os, Tuple&& t, index_sequence){if(&os == &cerr) return {{ (void(os << get(t) << ","), 0)... }};return {{ (void(os << get(t) << " "), 0)... }};} template ostream &operator<< (ostream &os, tuple p){if(&os == &cerr) os << "("; tuple_cout(os, p, make_index_sequence>>::value>{}); if(&os == &cerr) os << ")"; return os;} template ostream &operator<<(ostream &os, set s){if(&os == &cerr) os << "set["; for(T x : s) os << x << " "; if(&os == &cerr) os << "]"; return os;} template ostream &operator<<(ostream &os, multiset s){if(&os == &cerr) os << "multiset["; for(T x : s) os << x << " "; if(&os == &cerr) os << "]"; return os;} template ostream &operator<<(ostream &os, unordered_set s){if(&os == &cerr) os << "unordered_set["; for(T x : s) os << x << " "; if(&os == &cerr) os << "]"; return os;} template ostream &operator<<(ostream &os, unordered_multiset s){if(&os == &cerr) os << "unordered_multiset["; for(T x : s) os << x << " "; if(&os == &cerr) os << "]"; return os;} template ostream &operator<<(ostream &os, map m){if(&os == &cerr) os << "map["; for(auto [k, v] : m) os << "(" << k << "," << v << ") "; if(&os == &cerr) os << "]"; return os;} template ostream &operator<<(ostream &os, multimap m){if(&os == &cerr) os << "multimap["; for(auto [k, v] : m) os << "(" << k << "," << v << ") "; if(&os == &cerr) os << "]"; return os;} template ostream &operator<<(ostream &os, unordered_map m){if(&os == &cerr) os << "unordered_map["; for(auto [k, v] : m) os << "(" << k << "," << v << ") "; if(&os == &cerr) os << "]"; return os;} template ostream &operator<<(ostream &os, unordered_multimap m){if(&os == &cerr) os << "unordered_multimap["; for(auto [k, v] : m) os << "(" << k << "," << v << ") "; if(&os == &cerr) os << "]"; return os;} template ostream &operator<<(ostream &os, queue qu){if(&os == &cerr) os << "queue["; while(!qu.empty()){os << qu.front() << " ";qu.pop();} if(&os == &cerr) os << "]"; return os;} template ostream &operator<<(ostream &os, stack st){if(&os == &cerr) os << "stack["; while(!st.empty()){os << st.top() << " ";st.pop();} if(&os == &cerr) os << "]"; return os;} template ostream &operator<<(ostream &os, priority_queue qu){if(&os == &cerr) os << "prioroty_queue["; while (!qu.empty()){os << qu.top() << " ";qu.pop();} if(&os == &cerr) os << "]"; return os;} ////////////////////////////////////////////////////////// template void read(Ts&... a) {(cin >> ... >> a);} void out0(float a){cout< void out0(T a){cout<void out(T a) {out0(a); cout << "\n";} templatevoid out(T a, Ts... b) {out0(a); cout << " "; out(b...);} templatevoid outf(Ts... a) {out(a...); cout << flush;} void out0d(float a){cerr< void out0d(T a){cerr<void outd(T a) {out0d(a); cerr << endl;} templatevoid outd(T a, Ts... b) {out0d(a); cerr << " "; outd(b...);} ////////////////////////////////////////////////////////// template vector &operator++(vector& v){for(T& x : v) x++; return v;} template vector &operator--(vector& v){for(T& x : v) x--; return v;} template vector operator++(vector& v, signed){auto res = v; for(T& x : v) x++; return res;} template vector operator--(vector& v, signed){auto res = v; for(T& x : v) x--; return res;} template vector operator+=(vector& v, const vector& w){if(v.size() < w.size()) v.resize(w.size()); for(int i = 0; i < (int)w.size(); i++) v[i] += w[i]; return v;} template vector operator-=(vector& v, const vector& w){if(v.size() < w.size()) v.resize(w.size()); for(int i = 0; i < (int)w.size(); i++) v[i] -= w[i]; return v;} template vector operator*=(vector& v, const vector& w){if(v.size() < w.size()) v.resize(w.size()); for(int i = 0; i < (int)w.size(); i++) v[i] *= w[i]; return v;} template vector operator/=(vector& v, const vector& w){if(v.size() < w.size()) v.resize(w.size()); for(int i = 0; i < (int)w.size(); i++) v[i] /= w[i]; return v;} template vector operator+(vector v, const vector& w){return (v += w);} template vector operator-(vector v, const vector& w){return (v -= w);} template vector operator*(vector v, const vector& w){return (v *= w);} template vector operator/(vector v, const vector& w){return (v /= w);} template vector operator*=(vector& v, T w){for(T& x : v) x*=w; return v;} template vector operator/=(vector& v, T w){for(T& x : v) x/=w; return v;} template vector operator*(vector v, T x){return (v *= x);} template vector operator/(vector v, T x){return (v /= x);} template pair operator+=(pair& p, const pair& q){p.fi+=q.fi, p.se+=q.se; return p;} template pair operator+(pair p, const pair& q){return (p += q);} template pair operator-=(pair& p, const pair& q){p.fi-=q.fi, p.se-=q.se; return p;} template pair operator-(pair p, const pair& q){return (p -= q);} ////////////////////////////////////////////////////////// template bool isin(T x,T l,T r){return (l)<=(x)&&(x)<=(r);} template void yesno(T b){if(b)out("yes");else out("no");} template void YesNo(T b){if(b)out("Yes");else out("No");} template void YESNO(T b){if(b)out("YES");else out("NO");} template void posimp(T b){if(b)out("possible");else out("impossible");} template void PosImp(T b){if(b)out("Possible");else out("Impossible");} template void POSIMP(T b){if(b)out("POSSIBLE");else out("IMPOSSIBLE");} template bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;} template bool chmax(T&a,T b){if(a T dist_sq(P x, P y){return (x.fi-y.fi)*(x.fi-y.fi)+(x.se-y.se)*(x.se-y.se);} template T cross_product(P x, P y){return x.fi * y.se - x.se * y.fi;} template bool compare_by_arg(P x, P y){if(x == y) return false; if(x.fi == 0 && x.se == 0) return true; if(y.fi == 0 && y.se == 0) return false; if(x.se >= 0 && y.se < 0) return true; if(x.se < 0 && y.se >= 0) return false; if(x.se == 0 && y.se == 0) return x.fi > y.fi; return x.fi * y.se > x.se * y.fi;} template void argsort(V>& a){sort(all(a),compare_by_arg);} const vpi adj = {{1,0},{0,1},{-1,0},{0,-1}}; const vpi king = {{1,0},{1,1},{0,1},{-1,1},{-1,0},{-1,-1},{0,-1},{1,-1}}; const vpi knight = {{2,1},{1,2},{-1,2},{-2,1},{-2,-1},{-1,-2},{1,-2},{2,-1}}; void outs(ll a,ll b,ll i){if(abs(a)>=i-100)out(b);else out(a);} ll gcd(ll a,ll b){if(b==0)return abs(a);return gcd(abs(b),abs(a)%abs(b));} ll lcm(ll a,ll b){if(!a||!b) return 0; return abs((a / gcd(a,b)) * b);} template T POW(T a, ll b){T res=1;while(b){if(b&1)res=res*a;a=a*a;b>>=1;}return res;} ll divfloor(ll a, ll b){return (a >= 0 ? a/b : (a-b+1)/b);} ll divceil(ll a, ll b){return (a >= 0 ? (a+b-1)/b : a/b);} ll modpow(ll a,ll b,ll modd){ll res=1;a%=modd;while(b){if(b&1)res=res*a%modd;a=a*a%modd;b>>=1;}return res;} ll sqrtll(ll a){assert(a >= 0); ll r = (ll)sqrtl((ld)a)-1; while(r < 0 || (r+1)*(r+1) <= a) r++; return r;} ll cbrtll(ll a){assert(a >= 0); ll r = (ll)cbrtl((ld)a)-1; while(r < 0 || (r+1)*(r+1)*(r+1) <= a) r++; return r;} ll modinv(ll a, ll b){assert(a); if(a == 1) return 1; if(b == 1) return 0; ll ret = (1ll-b*modinv(b%a, a))/a; ret %= b; if(ret < 0) ret += b; return ret;} vs solve(ll h, ll w, ll k){ if(k == 0) return vs(h,string(w,'.')); if(h == 1 || w == 1) { if(k != 1) return {}; vs res(h,string(w,'.')); res[0][0] = '#'; return res; } if(k == 1 || k > (h-1)*(w-1)+1) return {}; if(k <= h){ vs res(h,string(w,'.')); rep(i,k-1) res[i][0] = '#'; return res; } vvb v2(h,vb(w-1,0)); ll x = 1, y = 1, len = 1; while(len + (h-x) < k){ if((x&1) && (y1) --y; else v2[x++][y-1] = 1; ++len; } while(x < h) v2[x++][y-1] = 1; vs res(h,string(w,'.')); rep(i,1,h) res[i][0] = '#'; rep(i,h) rep(j,w-1){ if(v2[i][j]) res[i][j+1] = (res[i][j] ^ '#' ^ '.'); else res[i][j+1] = res[i][j]; } return res; } int main(){ std::cin.tie(nullptr), std::ios_base::sync_with_stdio(false); ll TESTCASE = 1; // cin >> TESTCASE; while(TESTCASE--){ readi(h,w,k); auto ans = solve(h,w,k); if(ans.empty()) dame(-1); for(auto& t : ans) out(t); } }