#include <bits/stdc++.h> using namespace std; using ll = long long; const ll MAXW = 2025; const ll H_in = MAXW-3; ll choose_2(ll n) { return (n)*(n-1)/2; } int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t = 1; //cin >> t; vector res(MAXW, vector (MAXW, '.')); while(t--) { ll k; cin >> k; ll H_L = H_in; ll R = k; for (ll i = 0; i < MAXW; i++) { ll h = 0; for (; h <= H_L; h++) { if (choose_2(h)*i > R) break; } h--; assert(h >= 0); R -= choose_2(h)*i; assert(R >= 0); H_L = h; for (ll j = 0; j < h; j++) res[i][j] = '#'; } ll DISP = MAXW; ll i = 0; while(R > 0 && i < MAXW) { ll w = 0; for (; w <= DISP; w++) { if (choose_2(w) > R) break; } w--; R -= choose_2(w); for (ll j = 0; j < w; j++) { res[i][MAXW-2] = res[i][MAXW-1] = '#'; i++; } i++; } assert(R == 0); cout << MAXW << " " << MAXW << "\n"; for (ll i = 0; i < MAXW; i++) { for (ll j = 0; j < MAXW; j++) cout << res[i][j]; cout << "\n"; } } }