#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int) (x).size() typedef long long ll; typedef pair<int, int> pi; typedef vector<int> vi; constexpr int MAX = 2025; void draw(int n, int m) { rep(i, 0, n) { rep(j, 0, m) { cout << '#'; } rep(j, m, MAX) { cout << '.'; } cout << '\n'; } } void space() { rep(j, 0, MAX) { cout << '.'; } cout << '\n'; } int main() { cin.tie(0)->sync_with_stdio(0); cin.exceptions(cin.failbit); set<ll> s_1; unordered_map<ll, int> m_1; ll num = 0; for (int i = 2; i <= MAX; i++) { for (int j = 2; j <= MAX; j++) { num += (ll) (i - 1) * (j - 1); } // cout << i << " " << num << '\n'; s_1.insert(num); m_1[num] = i; } set<ll> s_2; unordered_map<ll, int> m_2; num = 0; for (int i = 2; i <= MAX; i++) { num += (i - 1); // cout << i << " " << num << '\n'; s_2.insert(num); m_2[num] = i; } ll k; cin >> k; ll k_temp = k; int h = 0; while (k_temp >= *s_1.begin()) { ll kk = *(--s_1.upper_bound(k_temp)); k_temp -= kk; h += m_1[kk] + 1; } while (k_temp >= *s_2.begin()) { ll kk = *(--s_2.upper_bound(k_temp)); k_temp -= kk; h += 2 + 1; } cout << h << ' ' << MAX << '\n'; if (h > MAX) while(true) k++; while (k >= *s_1.begin()) { ll kk = *(--s_1.upper_bound(k)); // cout << k << ' ' << kk << endl; k -= kk; draw(m_1[kk], MAX); space(); } while (k >= *s_2.begin()) { ll kk = *(--s_2.upper_bound(k)); // cout << k << ' ' << kk << endl; k -= kk; draw(2, m_2[kk]); space(); } return 0; }