#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> pll; #define For(i,a , n)for(ll i = a;i<(ll)n;i++) #define vec vector #define all(x) begin(x), end(x) #define sz(x)(ll)size(x) template<class A, class B> pair<A, B> operator+(const pair<A, B>& a, const pair<A, B>& b){ return {a.first + b.first, a.second + b.second}; } template<class A, class B> ostream& operator<<(ostream& os, const pair<A, B>& a){ return os<<"("<<a.first<<", "<<a.second<<")"; } template<class A, class B, class C> basic_ostream<A, B>& operator<<(basic_ostream<A, B>& os, const C& c){ for(auto itr = begin(c);itr!=end(c);++itr){ os<<(itr==begin(c)?"":" ")<<*itr; } return os; } template<typename... Args> void dbg(Args&&... args){ ((cerr<<args<<"| "),...); cerr<<endl; } void solve(){ ll k; cin >> k; ll h,w = 2025; vector<vector<char>> grid(2025); For(i,0,2025){ For(j,0,2025){ grid[i].push_back('.'); } } ll s; For(i,1,2025){ if(i*i*(i-1)*(i-1)/4 > k){ s = i-1; break; } } ll sp = s; k -= s*s*(s-1)*(s-1)/4; For(i,0,s){ For(j,0,s){ grid[i][j] = '#'; } } while(k > s){ For(w,2,s+1){ if(s * w*(w-1)/2 > k){ k -= s*(w-1)*(w-2)/2; For(i,0,w-1){ grid[s][i] = '#'; } s++; break; } } } ll vertical = 0; while(k){ For(i,2,2025){ if(i*(i-1)/2 > k){ //i-1 je ok k -= (i-2)*(i-1)/2; For(j,0,i-1){ grid[vertical+j][sp+1] = '#'; grid[vertical+j][sp+2] = '#'; } vertical += i; break; } } } cout << "2025 2025\n"; For(row,0,2025){ For(col,0,2025){ cout << grid[row][col]; } cout << "\n"; } } int main(){ cin.tie(0)->sync_with_stdio(0); cin.exceptions(cin.failbit); ll t = 1; // cin>>t; while(t--)solve(); }