#include <iostream> #define endl '\n' using namespace std; char a[3000][3000]; pair<long long, pair<int, int> > cnt[3000]; long long calc(int w, int h) { return 1ll * h * (h - 1) * w * (w - 1) / 4; } int main() { ios :: sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); long long k; cin >> k; for (int i = 1; i <= 2025; ++ i) { for (int j = 0; j < i; ++ j) { int w = i - (j == 0 ? j : j + 1); int l = 0, r = 2026, mid; while (r - l > 1) { mid = (l + r) / 2; long long c = calc(w, mid); if (c + cnt[j].first <= k) l = mid; else r = mid; } if (cnt[i].first < cnt[j].first + calc(w, l)) cnt[i] = {cnt[j].first + calc(w, l), {l, w}}; } } if (cnt[2025].first != k) while (true) {} int pos = 2025; while (pos > 0) { for (int i = 1; i <= cnt[pos].second.first; ++ i) { for (int j = pos - cnt[pos].second.second + 1; j <= pos; ++ j) { a[i][j] = '#'; } } for (int i = cnt[pos].second.first + 1; i <= 2025; ++ i) { for (int j = pos - cnt[pos].second.second + 1; j <= pos; ++ j) { a[i][j] = '.'; } } int j = pos - cnt[pos].second.second; if (j) { for (int i = 1; i <= 2025; ++ i) { a[i][j] = '.'; } } pos = j - 1; } cout << "2025 2025" << endl; for (int i = 1; i <= 2025; ++ i) { for (int j = 1; j <= 2025; ++ j) { cout << a[i][j]; } cout << endl; } return 0; }