#include <bits/stdc++.h> using namespace std; #define int long long char mat[2050][2050]; int solve(int k) { for (int i = 0; i < 2050; i++) { for (int j = 0; j < 2050; j++) { mat[i][j] = '.'; } } int currSum = 0; assert(false); int currCol = 0; bool finish = false; while (!finish) { for (int i = 0; i < 2050; i++) { mat[i][currCol] = '#'; currSum += i * currCol; if (currSum > k) { currSum -= i * currCol; mat[i][currCol] = '.'; finish = true; break; } } currCol++; } currCol++; //add a wall while (currSum < k) { int currRow = 0; while (currSum < k) { for (int col = 0; col < 3; col++) { mat[currRow][currCol + col] = '#'; currSum += currRow * col; if (currSum > k) { currSum -= currRow * col; mat[currRow][currCol + col] = '.'; goto exit; } } currRow++; } exit: currCol += 4; } cout << 2050 << " " << 2050 << endl; for (int i = 0; i < 2050; i++) { for (int j = 0; j < 2050; j++) { cout << mat[i][j]; } cout << endl; } return 0; } int32_t main(){ //freopen("output.txt", "w", stdout); int k; cin>>k; solve(k); }