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

using ll = long long;
using pii = pair<ll, ll>;
using vi = vector<ll>;
using vvi = vector<vi>;
#define rep(i, a, b) for(ll i = a; i < (b); ++i)
#define all(x) begin(x),end(x)
#define sz(x) (int)(x).size()

int main() {
    srand(time(0));
    cin.tie(0)->sync_with_stdio(0);
    cin.exceptions(cin.failbit);
    cout << setprecision(9) << fixed;

    auto f = [](ll w, ll h) {
        return (w * (w-1)) / 2 * (h * (h-1)) / 2;
    };

    auto r = [&](ll w, ll h, ll wi, ll hi) {
        ll wl = wi, wr = w - wi - 1, hl = hi, hr = h - hi - 1;
        return (w-1) * (h-1) + (w-1) * hl * hr + (h-1) * wl * wr;
    };

    ll k; cin >> k;

    ll line = 1977;

    tuple bestBlock = {0ll, 0, 0, 0, 0};
    rep(h, 1, 1978) {
        if (f(2025, h) < k) {
            bestBlock = max(bestBlock, {f(2025, h), 2025, h, -1, -1});
        }
        rep(i, 0, 20) {
            ll wi = rand() % 2025;
            ll hi = rand() % h;

            if (ll y = f(2025, h) - r(2025, h, wi, hi); y < k) {
                bestBlock = max(bestBlock, {y, 2025, h, wi, hi});
            }
        }
    }

    vector<decltype(bestBlock)> smol;
    rep(w, 1, 1013) rep(h, 1, 48) {
        smol.emplace_back(f(w, h), w, h, -1, -1);
        rep(i, 0, 20) {
            ll wi = rand() % w;
            ll hi = rand() % h;

            smol.emplace_back(f(w, h) - r(w, h, wi, hi), w, h, wi, hi);
        }
    }

    sort(all(smol));
    k -= get<0>(bestBlock);


    auto print = [&](decltype(bestBlock) block) {
        cout << "count: " << get<0>(block) << endl;
        cout << "w: " << get<1>(block) << endl;
        cout << "h: " << get<2>(block) << endl;
        cout << "wi: " << get<3>(block) << endl;
        cout << "hi: " << get<4>(block) << endl;
    };

    for (auto smol1 : smol) {
        auto smol2 = *lower_bound(all(smol), make_tuple(k - get<0>(smol1), -1, -1, -1, -1));


        if (get<0>(smol1) + get<0>(smol2) == k) {

            /*
            cout << "BestBlock" << endl;
            print(bestBlock);
            cout << "smol1" << endl;
            print(smol1);
            cout << "smol2" << endl;
            print(smol2);*/

            cout << 2025 << " " << 2025 << endl;
            rep(hi, 0, get<2>(bestBlock)) {
                rep(wi, 0, 2025) {
                    if (wi == get<3>(bestBlock) && hi == get<4>(bestBlock)) {
                        cout << ".";
                    } else {
                        cout << "#";
                    }
                }
                cout << endl;
            }
            rep(wi, 0, 2025) {
                cout << ".";
            }
            cout << endl;

            rep(hi, 0, 2024 - get<2>(bestBlock)) {
                if (hi >= get<2>(smol1)) {
                    rep(wi, 0, 1012) {
                        cout << '.';
                    }
                } else {
                    rep(wi, 0, get<1>(smol1)) {
                        if (wi == get<3>(smol1) && hi == get<4>(smol1)) {
                            cout << '.';
                        } else {
                            cout << '#';
                        }
                    }
                    rep(wi, get<1>(smol1), 1012) {
                        cout << '.';
                    }
                }

                cout << '.';

                if (hi >= get<2>(smol2)) {
                    rep(wi, 0, 1012) {
                        cout << '.';
                    }
                } else {
                    rep(wi, 0, get<1>(smol2)) {
                        if (wi == get<3>(smol2) && hi == get<4>(smol2)) {
                            cout << '.';
                        } else {
                            cout << '#';
                        }
                    }
                    rep(wi, get<1>(smol2), 1012) {
                        cout << '.';
                    }
                }
                cout << endl;
            }
            return 0;
        }
    }
    assert(false);
}