#include <bits/stdc++.h>
using namespace std;
#define int long long 
#define F first
#define S second

int coef(int s) {
	return s*(s-1) / 2;
}

signed main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	int k; cin >> k;
	int n = 2025;
	cout << n << " " << n << "\n";
	
	vector<vector<bool>> a(n, vector<bool> (n));
	
	int l = 1;
	while (coef(n) * coef(l+1) <= k) l++;
	k -= coef(n) * coef(l);
	
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < l; j++)
			a[i][j] = true;
	}
	
	int s = 1;
	while (coef(s+1) * l <= k) s++;
	k -= coef(s) * l;
	for (int i = 0; i < s; i++)
		a[i][l] = true;
	
	l += 2;
	int it = 0;
	while (k > 0) {
		int m = 1;
		while (coef(m+1) <= k && m+1 + it < n) m++;
		k -= coef(m);
		for (int i = 0; i < m; i++) {
			a[i + it][l] = true;
			a[i + it][l+1] = true;
		}
		
		it = m + it + 1;
		if (it >= n)
		{
			l += 3;
			it = 0;
		}
	}
	
	for(int i = 0;i<n;i++){
		for(int j = 0;j<n;j++){
			if(a[i][j])cout<<'#';
			else cout<<'.';
		}
		cout<< "\n";
	}
	
	
	
	
	
}