#include <bits/stdc++.h> using namespace std; const int MAXN = 2025; string s[MAXN]; long long k; long long c2(long long x) { return x*(x-1)/2; } void fillRect(int x1, int y1, int x2, int y2) { for (int i = x1; i <= x2; i++) { for (int j = y1; j <= y2; j++) { s[i][j] = '#'; } } } void solve(/*int x1, int y1, int sx, int sy, int dir*/) { int x1 = 0, y1 = 0, curH = MAXN; while (k > 0) { while (c2(curH) > k) curH--; int sx = 2; while (c2(sx+1)*c2(curH) <= k) { sx++; } fillRect(x1, 0, x1+sx-1, curH-1); k -= c2(sx)*c2(curH); x1 += sx+1; } /*if (dir == 0) { long long vel = c2(sx); int i; for (i = 0; i < sy; i++) { if (c2(sx)*c2(i+1) > k) { break; } } if (i == 0) { solve(x1, y1, sx, sy, dir^1); return; } fillRect(x1, y1, x1+sx-1, y1+i-1); solve(x1, y1+i+1, sx, sy-i, dir); } else if (dir == 1) { long long val = c2(sy); int i; for (i = 0; i < sx; i++) { if (c2(sy)*c2(i+1) > k) { break; } } if (i == 0) { solve(x1, y1, sx, sy, dir^1); return; } }*/ } int main() { cin >> k; for (int i = 0; i < MAXN; i++) { s[i] = string(MAXN, '.'); } solve(/*0, 0, 2025, 2025, 0*/); cout << MAXN << ' ' << MAXN << endl; for (int i = 0; i < MAXN; i++) { cout << s[i] << '\n'; } return 0; }