#pragma GCC optimize("O3") #include <bits/stdc++.h> //#define int long long 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 pb push_back typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; const ll maxH = 2025, maxW = 2025; vector<vector<char> > table(maxH, vector<char>(maxW, '#')); void print(){ cout << maxH << " " << maxW << "\n"; for(int i = 0; i < maxH; i++){ for(int j = 0; j < maxW; j++){ cout << table[i][j]; } cout << "\n"; } } ll topRow = 0; ll fill(int startX, int startY, int maxX, int maxY, ll upper_bound, bool breakEarly){ ll inc = 0; assert(startX <= maxX); assert(startY <= maxY); for(int x = startX; x <= maxX; x++){ ll h = x - startX + 1; bool broken = false; for(int y = startY; y <= maxY; y++){ ll w = y - startY + 1; ll add = (h - 1) * (w - 1); if(inc + add > upper_bound){ broken = true; break; } table[x][y] = '.'; // cout << "pasetinu: " << x << " " << y << endl; inc += add; topRow = x; } if((broken) && (breakEarly)){ break; } } return inc; } signed main(){ cin.tie(0); ios::sync_with_stdio(0); ll k; cin >> k; ll init = fill(0, 0, 2000, 2000, k, false); k -= init; // cout << "init = " << init << endl; topRow = 0; while(k > 0){ // cout << "topRow = " << topRow << endl; // cout << "k = " << k << endl; assert(topRow < maxH); ll diff = fill(topRow, 2002, 2024, 2024, k, true); k -= diff; topRow += 2; } print(); return 0; }