#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> pll; #define For(i,a , n)for(ll i = a;i<(ll)n;i++) #define vec vector #define all(x) begin(x), end(x) #define sz(x)(ll)size(x) template<class A, class B> pair<A, B> operator+(const pair<A, B>& a, const pair<A, B>& b){ return {a.first + b.first, a.second + b.second}; } template<class A, class B> ostream& operator<<(ostream& os, const pair<A, B>& a){ return os<<"("<<a.first<<", "<<a.second<<")"; } template<class A, class B, class C> basic_ostream<A, B>& operator<<(basic_ostream<A, B>& os, const C& c){ for(auto itr = begin(c);itr!=end(c);++itr){ os<<(itr==begin(c)?"":" ")<<*itr; } return os; } template<typename... Args> void dbg(Args&&... args){ ((cerr<<args<<"| "),...); cerr<<endl; } ll compute(ll r, ll s){ ll ans = r*s*(r*s -r - s + 1)/4; // dbg(r, s, ans); return ans; } ll compute2(ll d, ll akt){ return d*(d-1)*akt/2; } void solve(){ ll k;cin>>k; ll stvorec = 0; // dbg(compute(3, 1), compute(2, 2),compute(3,3)); while(compute(stvorec, stvorec) <= k)stvorec++; --stvorec; k-= compute(stvorec, stvorec); ll akt = stvorec; vec<ll> riadky; // dbg(stvorec, k); while(true){ ll i = 0; while(compute2(i, akt) <= k) i++; i--; if(i == 0 || i == 1) { break; } if(i > stvorec) i = stvorec; // dbg(i, akt + 1, compute2(i, akt)); riadky.push_back(i); k-= compute2(i, akt); akt++; } // dbg(riadky, k); vec<ll> obdlzniky; while(k){ ll d = 0; while(compute(2, d) <= k)d++; d--; obdlzniky.push_back(d); k -= compute(2, d); } const ll maxd = 10; vec<string>ans(maxd, string(maxd,'.')); For(i, 0, stvorec){ For(j, 0, stvorec){ ans[i][j] = '#'; } } akt = stvorec; for(auto i : riadky){ For(j, 0, i){ ans[akt][j] = '#'; } akt++; } ll zac = stvorec + 1; akt = 0; for(auto i : obdlzniky){ For(j, 0, i){ ans[j + akt][zac] = '#'; ans[j + akt][zac + 1] = '#'; } akt += i + 1; } cout<<maxd<<' '<<maxd<<endl; For(i, 0, sz(ans))cout<<ans[i]<<"\n"; } int main(){ cin.tie(0)->sync_with_stdio(0); cin.exceptions(cin.failbit); ll t = 1; // cin>>t; while(t--)solve(); }