#include using namespace std; int main() { int N; cin >> N; if(N == 1) { cout << "." << endl; return 0; } vector>tmp; while(N > 1) { int n = N; while (n > 1) { tmp.push_back({(n+1)/2+1,n/2+1}); n = n/2; } N = (N+1)/2; } int sum1 = 0,sum2 = 0; for(int i = 0; i < tmp.size(); i++) { sum1 += tmp[i].first; sum2 += tmp[i].second; } cout << sum1 << " " << sum2 << endl; vectorans(sum1,string(sum2,'#')); sum1 = 0,sum2 = 0; for(int i = 0; i < tmp.size(); i++) { if(i) { ans[sum1-1][sum2] = '.'; } for(int j = sum1; j < sum1+tmp[i].first; j++) { for(int k = sum2; k < sum2+tmp[i].second; k++) { ans[j][k] = '.'; } } sum1 += tmp[i].first; sum2 += tmp[i].second; } for(int i = 0; i < sum1; i++) { cout << ans[i] << endl; } }