#include <algorithm> #include <iostream> #include <vector> #include <cmath> #define endl '\n' using namespace std; char a[3000][3000]; 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 = 1; j <= 2025; ++ j) { a[i][j] = '.'; } } for (int i = 1; i <= 2025; ++ i) { for (int j = 1; j <= 2025; ++ j) { if (1ll * (i - 1) * (j - 1) <= k) { a[i][j] = '#'; k -= 1ll * (i - 1) * (j - 1); } } } for (int i = 2025; i >= 1; -- i) { for (int j = 2025; j >= 1; -- j) { if (a[i - 1][j] == '#' or a[i][j - 1] == '#' or a[i + 1][j] == '.' or a[i][j + 1] == '.') break; if (1ll * (2025 - i) * (2025 - j) <= k) { a[i][j] = '#'; k -= 1ll * (2025 - i) * (2025 - j); } } } for (int i = 1; i <= 2025; ++ i) { for (int j = 1; j <= 2025; ++ j) { bool flag = true; for (int x = i; x < i + 5; ++ x) { for (int y = j; y < j + 5; ++ y) { if (a[x][y] == '#') flag = false; if (a[x - 1][y] == '#') flag = false; if (a[x][y - 1] == '#') flag = false; if (a[x + 1][y] == '#') flag = false; if (a[x][y + 1] == '#') flag = false; } } if (flag) { for (int x = i; x < i + 5; ++ x) { for (int y = j; y < j + 5; ++ y) { if (1ll * (x - i) * (y - j) <= k) { a[x][y] = '#'; k -= 1ll * (x - i) * (y - j); } } } break; } } } ///cout << k << endl; ///return 0; 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; }