#include "bits/stdc++.h" using namespace std; #define all(x) x.begin(), x.end() #define int long long void solve() { } int cnk(int n) { return n * (n-1) / 2; } const int MX = 2025; vector<array<int, 4>> prem; void solve(int k) { int c = 0; vector<vector<char>> pole(MX, vector<char>(MX, '.')); while (k != 0) { array<int, 4> tkn = {0, 0, 0, 0}; for (int i = 0; i < prem.size(); ++i) { if (k < prem[i][1]) { k -= tkn[1]; if (c + tkn[0] >= MX) { exit(1); } if (tkn[3] == -1) { for (int j = 0; j < tkn[1]; ++j) { int t = j * 3; pole[c][t] = pole[c+1][t] = pole[c][t+1] = pole[c+1][t+1] = '#'; } } else { for (int j = 0; j < tkn[2]; ++j) { for (int l = 0; l < tkn[0]; ++l) { pole[c+l][j] = '#'; } } if (tkn[3] != 0) { for (int j = tkn[3]-1; j < MX; ++j) { pole[c][j] = '.'; } } } c += tkn[0] + 1; break; } if (prem[i][1] > tkn[1]) { tkn = prem[i]; } } //cerr << mxt << ' ' << mxc << '\n'; //cerr << k << endl; } cout << "2025 2025\n"; for (auto i : pole) { for (auto j : i) cout << j; cout << '\n'; } return; } signed main() { ios::sync_with_stdio(0); cin.tie(0);cout.tie(0); for (int i = 2; i <= MX; ++i) { for (int j = i; j <= MX; ++j) { prem.push_back({i, cnk(i) * cnk(j), j, 0}); if (j >= MX) { int res = cnk(i) * cnk(j); for (int k = j; k >= 2; --k) { res -= (k-1) * (i-1); prem.push_back({i, res, j, k}); } } } } for (int i = 1; i <= MX/3; ++i) { prem.push_back({2, i, -1, -1}); } sort(all(prem)); int t; cin >> t; solve(t); /* int x = 4e12; int c = 2025; int mx = 0; for (int i = 0; i < 1000000; ++i) { if ((mx = max(mx, solve(x - i * 1345239))) > c) { cout << solve(x - i * 1345239) << '\n'; exit(1); } cerr << mx << '\n'; } int prc = 0; */ /* int t = 1; cin >> t; while (t--) solve(); */ }