#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

ll ev(ll w,ll h){
    return w*(w-1)/2*h*(h-1)/2;
}

void solve(){
    ll k;
    cin>>k;
    ll w=2025,h=2025;
    vector<pair<int,int>>res;
    while(h>=2){
        while(ev(w,h)<=k){
            k-=ev(w,h);
            res.push_back({w,h});
        }
        h--;
    }
    h++;
    while(w>=2){
        while(ev(w,h)<=k){
            k-=ev(w,h);
            res.push_back({w,h});
        }
        w--;
    }

    /*for(auto i:res) {
        cout<<i.first<<" "<<i.second<<"\n";
    }*/

    vector grid(2025,vector(2025,false));
    int y=0,x=0;
    for(auto i:res){
        if(x+i.first>2025){
            x=0;
            y+=3;
        }

        for(int i1=0;i1<i.first;i1++){
            for(int i2=0;i2<i.second;i2++){
                if(y+i2>=2025){
                    abort();
                }
                grid[y+i2][x+i1]=true;
            }
        }
        if(i.second!=2)
            y+=i.second+1;
        else{
            x+=i.first+1;
        }
    }
    cout<<"2025 2025\n";
    for(auto i:grid){
        for(auto j:i){
            cout<<(j?'#':'.');
        }
        cout<<"\n";
    }
}

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