#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

void solve(){
    ll k;//=(rand()+((1LL*rand())<<32))%4000000000001;
    cin>>k;
    vector<int>res;
    int h=0;
    while(k>0){
        int curr=1;
        ll score=0;
        ll prev_score=0;
        int x=0,y=1;
        while(score<=k){
            x++;
            curr++;
            if(x==2025){
                x=0;
                y++;
            }
            prev_score=score;
            score+=1LL*x*y;
        }
        curr--;
        k-=prev_score;
        res.push_back(curr);
        h+=y+1;
    }

    if(h>2025) {
        abort();
        //cout<<k<<"\n";
    }

    /*for (int i: res) {
        cout << i << "\n";
    }*/

    vector grid(2025,vector(2025,false));
    int x=0,y=0;
    for(int i:res) {
        bool first_row=true;
        while(i){
            grid[y][x]=true;
            if(first_row)
                grid[y+1][x]=true;
            x++;
            i--;
            if(x==2025){
                x=0;
                y++;
                if(first_row){
                    y++;
                    first_row=false;
                }
            }
        }
        y+=2+first_row;
        x=0;
    }

    cout<<"2025 2025\n";
    for(auto i:grid){
        for(auto j:i){
            cout<<(j?"#":".");
        }
        cout<<"\n";
    }

    //abort();
    //cout<<k<<"\n";
}

int main(){
    ios_base::sync_with_stdio(0),cin.tie(0);
    int t=1;//cin>>t;
    while(t--) solve();
}