#include<iostream>

using namespace std;

int main() {
	int A, B;
	cin >> A >> B;
	//上半分はBを背景として、ぽつぽつとWがある感じ
	//下半分はその逆
	cout << 100 << " " << 100 << endl;
	for (int i = 0; i < 50; i++) {
		for (int j = 0; j < 100; j++) {
			if (A >= 2 && i % 2 == 1 && j % 2 == 1) {
				cout << ".";
				A--;
			}
			else cout << "#";
		}
		cout << endl;
	}
	for (int i = 50; i < 100; i++) {
		for (int j = 0; j < 100; j++) {
			if (B >= 2 && i % 2 == 1 && j % 2 == 1) {
				cout << "#";
				B--;
			}
			else cout << ".";
		}
		cout << endl;
	}

	return 0;
}