import std.stdio, std.algorithm, std.range, std.conv, std.string, std.math;
import core.stdc.stdio;
// foreach, foreach_reverse, writeln

void main() {
	int a, b;
	scanf("%d%d", &a, &b);
	const uint n = 100;
	char[n][n] s;
	foreach (i; 0..n) {
		foreach (j; 0..n) {
			s[i][j] = ".#"[i < n/2];
		}
	}
	foreach (i; 0..n/2) {
		if (i%2 == 1) continue;
		foreach (j; 0..n) {
			if (j%2 == 1) continue;
			if (a == 1) break;
			a--;
			s[i][j] = '.';
		}
	}
	foreach (i; 0..n/2) {
		if (i%2 == 0) continue;
		foreach (j; 0..n) {
			if (j%2 == 1) continue;
			if (b == 1) break;
			b--;
			s[n/2+i][j] = '#';
		}
	}
	writefln("%d %d", n, n);
	foreach (i; 0..n) {
		writeln(s[i]);
	}
}

