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

using ll = long long;
using LL = long long;
using i64 = long long;

void solve() {
    i64 k; cin >> k;
    
    vector<string> grid(2025, string(2025, '.'));
    for (i64 i = 0; i <= 2001; i++) {
        grid[0][i] = '#';
    }
    for (i64 i = 0; i < 2025; i++) {
        grid[i][0] = '#';
    }

    i64 lim = 2001, cnt = 0;
    for (i64 r = 1; r < 2025; r++) {
        if (lim == 0) break;
        for (i64 c = 1; c <= lim; c++) {
            if (cnt + r * c > k) {
                lim = c - 1;
                break;
            }
            grid[r][c] = '#';
            cnt += r * c;
        }
    }
    assert(lim == 0);

    cerr << k - cnt << '\n';

    grid[3][2010] = grid[3][2011] = '#';
    for (int i = 0; i < k - cnt; i++) {
        grid[4 + i][2010] = grid[4 + i][2011] = '#';
    } 

    cout << "2025 2025\n";
    for (auto row: grid)
        cout << row << '\n'; 
}

int main() {
    ios_base::sync_with_stdio(false); cin.tie(nullptr);
    solve();
}