#include <bits/stdc++.h>
using namespace std;
#define fwd(i, a, n) for(int i = (a); i < (n); i++)
#define rep(i, n) fwd(i, 0, n)
#define all(X) X.begin(), X.end()
#define sz(X) int(size(X))
#define pb push_back
#define eb emplace_back
#define st first
#define nd second
using pii = pair<int, int>; using vi = vector<int>;
using ll = long long; using ld = long double;
#ifdef LOC
auto SS = signal(6, [](int) {* (int *) 0 = 0;});
#define DTP(x, y) auto operator << (auto& o, auto a) -> decltype(y, o) {o << "("; x; return o << ")";}
DTP(o << a.st << ", " << a.nd, a.nd);
DTP(for(auto i : a) o << i << ", ", all(a));
void dump(auto... x) {((cerr << x << ", "), ...) << "\n";}
#define deb(x...) cerr << setw(4) << __LINE__ << ":[" #x "]: ", dump(x)
#else
#define deb(...) 0
#endif

ll f(ll i) {
    return i*(i-1)/2;
}

array<int, 3> sol(ll x) {
    rep(a, 50) rep(b, 50) rep(c, 50) {
        if (f(a) + f(b) + f(c) == x)
            return {a, b, c};
    }
    assert(false);
}

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

    int h = 2025;
    int w = 2025;

    vi a(w);
    for (int i = w-1; i >= 0; --i) {
        if (i+1 < w) a[i] = a[i+1];

        while (f(i+1) * f(a[i] + 1) <= k && a[i] < h-5)
            ++a[i];
        
        k -= i * f(a[i]);
        assert(k >= 0);
    }

    deb(a);

    vector<string> ans(w, string(h, '.'));

    rep(j, w) {
        rep(i, a[j])
            ans[i][j] = '#';
    }

    
    auto [x, y, z] = sol(k);

    int ne = w-1;
    rep(_, x) {
        ans[h-1][ne] = '#';
        ans[h-2][ne] = '#';
        --ne;
    }
    --ne;
    rep(_, y) {
        ans[h-1][ne] = '#';
        ans[h-2][ne] = '#';
        --ne;
    }
    --ne;
    rep(_, z) {
        ans[h-1][ne] = '#';
        ans[h-2][ne] = '#';
        --ne;
    }
    --ne;

    deb(k);

    cout << h << ' ' << w << '\n';

    for (string s : ans)
        cout << s << '\n';
    cout << '\n';
}

int32_t main(){
    cin.tie(0)->sync_with_stdio(0);
    cout << fixed << setprecision(10);

    int z = 1;
    #ifdef LOC
    // cin >> z;
    #endif
    while (z--) sol();

    return 0;
}