#include <algorithm>
#include <iostream>
#include <vector>
#include <cmath>
#define endl '\n'
using namespace std;

long long k;
int hmax = 2025, wmax = 2025;
char a[3000][3000];

long long calc(int h, int w)
{
    return 1ll * h * (h - 1) * w * (w - 1) / 4;
}

void solve()
{
    long long t = 0;
    int h0 = 1, w0 = 1;
    for (int h = 1; h <= hmax; ++ h)
    {
        for (int w = 1; w <= wmax; ++ w)
        {
            long long curr = calc(h, w);
            if (curr <= k and curr > t)
            {
                t = curr;
                h0 = h;
                w0 = w;
            }
            if (curr == t and abs(h0 - w0) > abs(h - w))
            {
                h0 = h;
                w0 = w;
            }
        }
    }

    for (int i = hmax - h0 + 1; i <= hmax; ++ i)
    {
        for (int j = wmax - w0 + 1; j <= wmax; ++ j)
        {
            a[i][j] = '#';
        }
    }
    k -= t;

    t = 0;
    int h1 = 0, w1 = 0;
    for (int h = 1; h <= h0; ++ h)
    {
        for (int w = 1; w <= wmax - w0 - 1; ++ w)
        {
            long long curr = calc(h, w);
            if (curr <= k and curr > t)
            {
                t = curr;
                h1 = h;
                w1 = w;
            }
        }
    }

    for (int i = hmax - h1 + 1; i <= hmax; ++ i)
    {
        for (int j = 1; j <= w1; ++ j)
        {
            a[i][j] = '#';
        }
    }
    k -= t;

    t = 0;
    int h2 = 0, w2 = 0;
    for (int h = 1; h <= hmax - h0 - 1; ++ h)
    {
        for (int w = 1; w <= w0; ++ w)
        {
            long long curr = calc(h, w);
            if (curr <= k and curr > t)
            {
                t = curr;
                h2 = h;
                w2 = w;
            }
        }
    }

    for (int i = 1; i <= h2; ++ i)
    {
        for (int j = wmax - w2 + 1; j <= wmax; ++ j)
        {
            a[i][j] = '#';
        }
    }
    k -= t;

    hmax -= h0 + 1;
    wmax -= w0 + 1;
}

int main()
{
    cin >> k;

    for (int i = 1; i <= 2025; ++ i)
    {
        for (int j = 1; j <= 2025; ++ j)
        {
            a[i][j] = '.';
        }
    }

    while (k)
    {
        solve();
    }

    cout << "2025 2025" << endl;
    for (int i = 1; i <= 2025; ++ i)
    {
        for (int j = 1; j <= 2025; ++ j)
        {
            cout << a[i][j];
        }
        cout << endl;
    }

    return 0;
}