#include <bits/stdc++.h> using namespace std; using ll = long long; using LL = long long; using i64 = long long; void solve() { i64 k; cin >> k; vector<string> grid(2025, string(2025, '.')); for (i64 i = 0; i <= 2001; i++) { grid[0][i] = '#'; } for (i64 i = 0; i < 2025; i++) { grid[i][0] = '#'; } i64 lim = 2001, cnt = 0; for (i64 r = 1; r < 2025; r++) { if (lim == 0) break; for (i64 c = 1; c <= lim; c++) { if (cnt + r * c > k) { lim = c - 1; break; } grid[r][c] = '#'; cnt += r * c; } } assert(lim == 0); cerr << k - cnt << '\n'; for (int i = 0; i < k - cnt; i++) { int sx = 10 + 3 * (i / 3); int sy = 2005 + 3 * (i % 3); grid[sx][sy] = grid[sx + 1][sy] = grid[sx][sy + 1] = grid[sx + 1][sy + 1] = '#'; } cout << "2025 2025\n"; for (auto row: grid) cout << row << '\n'; } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); solve(); }