#include <bits/stdc++.h> using namespace std; long long k; bool ans[2048][2048]; int main() { ios::sync_with_stdio(0); cin.tie(0); cin >> k; for (int i = 0; i < 2025; i++) ans[0][i] = 1; long long x = 2025; long long i = 1; for (; i < 2025; i++) { while (i * x * (x - 1) / 2 > k) x--; if (x < 2) break; for (int j = 0; j < x; j++) ans[i][j] = 1; k -= i * x * (x - 1) / 2; } i++; int j = 0; while (k > 0) { if (j < 2024) { ans[i][j] = ans[i][j + 1] = ans[i + 1][j] = ans[i + 1][j + 1] = 1; j += 3; k --; } else { i += 3; j = 0; } } cout << "2025 2025\n"; for (i = 0; i < 2025; i++) { for (j = 0; j < 2025; j++) { if (ans[i][j]) cout << "#"; else cout << "."; } cout << '\n'; } }