#include #include using namespace std; using namespace atcoder; typedef modint998244353 mint; typedef long long ll; void divide(int n, vector> &g){ if (n == 1) return; if (n == 3){ g.push_back(pair(3, 3)); return; } int t = n / 2; int s = n - t; g.push_back(pair(t+1, s+1)); divide(t, g); divide(s, g); } int main(){ int n; cin >> n; if (n == 1){ cout << 1 << " " << 1 << endl; cout << "." << endl; return 0; } vector> g; int h = 0, w = 0; divide(n, g); for (int i=0; i<(int)g.size(); i++){ if (g[i].first < g[i].second){ swap(g[i].first, g[i].second); } h += g[i].first; w += g[i].second; //cout << g[i].first << " " << g[i].second << endl; } h -= (int)g.size() - 1; vector> s(h, vector(w, '#')); int ph = 0; int pw = 0; for (int i=0; i<(int)g.size(); i++){ for (int x=ph; x