#include <bits/stdc++.h>
using namespace std;

int res[100][100];

int main()
{
	for (int i = 0; i < 50; i++) {
		for (int j = 0; j < 100; j++) {
			res[i][j] = 1;
		}
	}
	int A, B;
	cin >> A >> B; A--, B--;
	int x = 0, y = 0;
	for (int i = 0; i < A; i++) {
		res[x][y] = 0;
		x += 2;
		if (x >= 50) {
			x = 0;
			y += 2;
		}
	}
	x = 51, y = 0;
	for (int i = 0; i < B; i++) {
		res[x][y] = 1;
		x += 2;
		if (x >= 100) {
			x = 51;
			y += 2;
		}
	}
	cout << 100 << ' ' << 100 << endl;
	for (int i = 0; i < 100; i++) {
		for (int j = 0; j < 100; j++) {
			cout << (res[i][j] ? '#' : '.');
		}
		cout << endl;
	}
	return 0;
}
