#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MAX = (ll)4e13; const int N = 2025; char soln[N][N]; ll k; void solve(int i1, int j1, int i2, int j2){ if(i1 > i2 || j1 > j2) return; if(k ==0 ) return; int p = 0; int q = 0; ll big = 0; for(int x = i2; x >= i1; x -- ){ for(int y = j2; y >= j1; y -- ){ ll ni = x - i1 + 1; ll nj = y - j1 + 1; ll f = (ni * 1ll * (ni - 1) / 2ll) * 1ll * (nj * 1ll * (nj - 1) / 2ll); if(f <= k){ if(f > big){ big = f; p = x; q = y; } } } } k -= big; for(int x = i1; x <= p; x ++ ){ for(int y = j1; y <= q; y ++ ){ soln[x][y] = '#'; } } solve(p + 2, j1, i2, j2); solve(i1, q + 2, p + 2, j2); } int main(){ cin >> k; for(int i = 0; i < N; i ++ ){ for(int j = 0 ; j < N; j ++ ){ soln[i][j] = '.'; } } solve(0, 0, N - 1, N - 1); cout << N << " " << N << "\n"; for(int i = 0 ; i < N; i ++ ){ for(int j = 0 ; j < N; j ++ ){ cout << soln[i][j]; } cout << "\n"; } return 0; }