#include <stdio.h>
#include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
using mint = modint998244353;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf32 1000000001
#define Inf64 4000000000000000001

int main(){
	
	int n;
	cin>>n;
	
	int sz = 2000;
	vector<string> S(sz,string(sz,'#'));
	int x = 0,y = 0;
	int cur = 1;
	int T = 0;
	vector<int> rem(1,n);
	while(rem.size()>0){
		if(rem[0]==1){
			rem.erase(rem.begin());
			continue;
		}
		int A = rem[0]/2;
		int B = rem[0] - A;
	
		if(x>y){
			rep(i,A+1){
				rep(j,B+1){
					S[x+i][y+j] = '.';
				}
			}
			x += A;
			y += B+1;
		}
		else{
			rep(i,A+1){
				rep(j,B+1){
					S[x+j][y+i] = '.';
				}
			}
			x += B+1;
			y += A;
		}
		rep(i,1)rem.push_back(A);
		rep(i,1)rem.push_back(B);
		rem.erase(rem.begin());
	}
	//cout<<x<<' '<<y<<endl;
	//return 0;
	S[x][y] = '.';
	while(x!=sz-1){
		x++;
		S[x][y] = '.';
	}
	while(y!=sz-1){
		y++;
		S[x][y] = '.';
	}
	cout<<sz<<' '<<sz<<endl;
	rep(i,S.size()){
		cout<<S[i]<<endl;
	}
	
		
	
	return 0;
}