#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; #define all(x) begin(x),end(x) #define rep(i,a,b) for(int i=(a);i<(b);++i) #define sz(x) int(x.size()) int main() { cin.tie(NULL); cin.sync_with_stdio(false); ll k; cin >> k; vector<vector<char>> field(2025,vector(2025,'.')); auto fill = [&] (int r, int c, int h, int w) { rep(R,r,r+h) rep(C,c,c+w) field[R][C]='#'; }; auto block = [&] (ll N, ll M, ll P) -> ll { return N*(N-1)*M*(M-1)/4 + N*P*(P-1)/2; }; if(k==0) { cout << "1 1\n.\n"; exit(0); } // main block ll M=2000; ll z=M; for(;z<M*2001;z++) { ll N = z/M; ll P = z-N*M; if(block(N,M,P)>k) break; } z-=1; ll N = z/M; ll P = z-N*M; fill(0,0,N,M); fill(0,0,N+1,P); k-=block(N,M,P); cerr << N <<','<<M<<','<<P<<"\n"; cerr<<k<<" left\n"; //sidebar 1 M=24; z=M; for(;z<M*1000;z++) { ll N = z/M; ll P = z-N*M; if(block(N,M,P)>k) break; } z-=1; N = z/M; P = z-N*M; fill(0,2001,N,M); fill(0,2001,N+1,P); k-=block(N,M,P); cerr << N <<','<<M<<','<<P<<"\n"; cerr<<k<<" left\n"; //sidebar 2 M=24; z=M; for(;z<M*1000;z++) { ll N = z/M; ll P = z-N*M; if(block(N,M,P)>k) break; } z-=1; N = z/M; P = z-N*M; fill(1001,2001,N,M); fill(1001,2001,N+1,P); k-=block(N,M,P); cerr << N <<','<<M<<','<<P<<"\n"; cerr<<k<<" 2x2blocks\n"; //blocks z=0; while(k--) { ll c=z/7; ll r=z%7; fill(2002+r*3,0+c*3,2,2); z++; } cout << "2025 2025\n"; rep(r,0,2025) { for(auto c:field[r]) cout << c; cout << "\n"; } } /*\ 4000000000000 */