#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 s; for(s=0;cnt((s+1)/2, (s+1+1)/2)<=k;s++) ; int sx = s/2; int sy = (s+1)/2; place(sx, sy); //printf("%d %lld\n", s, cnt(s,s)); } while(k) { int s; for(s=0;cnt(2, (s+1))<=k;s++) ; place(2, s); //printf("%d %lld\n", s, cnt(s,s)); } //printf("%d\n", x); fo(i,S) printf("%s\n", out[i]); }