#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> pii;
typedef vector<int> vi;

const ll n = 2025;
char A[n][n];

int main() {
    cin.tie(0)->sync_with_stdio(0);
    // cin.exceptions(cin.failbit);
    ll k; cin >> k;
    rep(i, 0, n) rep(j, 0, n) A[i][j] = '.';
    ll col = 1, last = 0;
    rep(i, 0, n) A[i][0] = '#';
    while (k > 0) {
        ll row = 1;
        while (row < n && (col-last)*(row+1)*(row)/2 <= k) row++;
        if (row == 1) {
            last = col+1;
            col++;
            rep(i, 0, n) A[i][last] = '#';
        } else {
            rep(i, 0, row) A[i][col] = '#';
            k -= (col-last)*(row)*(row-1)/2;
            col++;
        }
        assert(col < n);
    }
    assert(k == 0);
    printf("%lld %lld\n", n, n);
    rep(i, 0, n) {
        rep(j, 0, n) printf("%c", A[i][j]);
        printf("\n");
    }
}