#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i=a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() #define fo(i, b) for(int i=0; i < (b); ++i) #define F first #define S second #define MP make_pair typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; typedef pair<int, int> pii; typedef pair<ll, ll> pll; ll k; const int S = 2025; char out[S+1][S+1]; int x = 0; ll cnt(ll x, ll y) { return (x*x*y*y-x*y*y-x*x*y+x*y)/4; } void place(int sx, int sy) { fo(i,sx)fo(j,sy) out[x+i][j] = '#'; x += sx+1; k-=cnt(sx,sy); } signed main() { cin.tie(0)->sync_with_stdio(0); cin.exceptions(cin.failbit); cin >> k; printf("%d %d\n", S, S); fo(i,S) fo(j,S) out[i][j]='.'; //while(k>cnt(2025,2)) { int optx=0, opty=0; fo(sy, 2025) fo(sx, sy+1) if(cnt(sx, sy)<=k && cnt(sx,sy)>cnt(optx, opty)) { optx=sx, opty=sy; } place(optx, opty); //printf("%d %d %lld\n", optx, opty, cnt(optx, opty)); for(int i=0;i*optx<k;i++) out[optx][i] = '#', k-=i*optx; x++; } int y=0; while(k) { int s; for(s=0;cnt(2, (s+1))<=k;s++) ; if(y+s > 2025) x+=3, y=0; fo(i,2)fo(j,s) out[x+i][y+j] = '#'; k-=cnt(2,s); y+= s+1; //printf("%d %lld\n", s, cnt(2,s)); } //printf("%d\n", x); fo(i,S) printf("%s\n", out[i]); }