#include <bits/stdc++.h>
using namespace std;

#define all(x) ::begin(x), ::end(x)
#define tsolve int t; cin >> t; while (t--) solve
#define sz(x) (int)::size(x)
using ll = long long;
using ld = long double;

void solve() {
    ll k;
    cin >> k;

    auto calc = [](ll x, ll y) {
        return x*(x-1) * y * (y-1) / 4;
    };

    vector<int> idk;
    ll height = 2005;
    idk.push_back(height);
    for (ll i=1; i<2005; i++) {
        while (height * (height-1) / 2 * i > k) {
            height--;
        }
        idk.push_back(height);
        k -= height * (height-1) / 2 * i;
    }

    vector<int> idk2;
    for (int i=19; i>=2; i--) {
        for (int j=i; j>=2; j--) {
            if (calc(i, j) <= k) {
                k -= calc(i, j);
                for (int k2=0; k2<j; k2++) {
                    idk2.push_back(i);
                }
                idk2.push_back(0);
            }
        }
    }

    vector<string> ans(2025, string(2025, '.'));
    for (int i=0; i<ssize(idk); i++) {
        for (int j=0; j<idk[i]; j++) {
            ans[j][i] = '#';
        }
    }
    for (int i=0; i<ssize(idk2); i++) {
        for (int j=0; j<idk2[i]; j++) {
            ans[2006 + j][i] = '#';
        }
    }
    assert(k == 0);
    cout << "2025 2025\n";
    for (string e : ans) cout << e << '\n';
}

int main() {
    cout.tie(0)->sync_with_stdio(false);
    cout << setprecision(16);
    solve();
}