import std.stdio;
import std.range;
import std.array;
import std.string;
import std.conv;
import std.typecons;
import std.algorithm;
import std.container;
import std.typecons;
import std.random;
import std.math;
import core.time;

int[][] ofs = [
	[0, 1],
	[1, 0],
	[-1, 0],
	[0, -1]
];

void fill(bool[][] field, bool[][] done, int x, int y, bool color)
{
	foreach (d; ofs) {
		int nx = d[0] + x;
		int ny = d[1] + y;
		if (nx < 0 || field[0].length <= nx
				|| ny < 0 || field.length <= ny) {
			continue;
		}
		if (field[ny][nx] != color) {
			continue;
		}
		if (done[ny][nx]) {
			continue;
		}
		done[ny][nx] = true;
		fill(field, done, nx, ny, color);
	}
}

alias Ret = Tuple!(int, "a", int, "b");
Ret cal(bool[][] field) {
	if (field.length == 0) {
		return Ret.init;
	}
	bool[][] done = new bool[][](field.length, field[0].length);
	Ret ret;
	foreach (int y, arr; field) {
		foreach (int x, color; arr) {
			if (done[y][x]) {
				continue;
			}
			done[y][x] = true;
			if (field[y][x]) {
				ret.b++;
			} else {
				ret.a++;
			}
			fill(field, done, x, y, color);
		}
	}
	return ret;
}

void main()
{
	auto inp = readln.chomp.split.map!(to!int);
	int a = inp.front;
	int b = inp.back;
	bool[][] field = new bool[][](100, 100);
	foreach (ref arr; field[0..50]) {
		foreach (ref v; arr) {
			v = true;
		}
	}
	--a;
	--b;
	foreach (i; 0..a) {
		int x = (i * 2) % 100;
		int y = (i * 2) / 100 * 2;
		field[y][x] = false;
	}
	foreach (i; 0..b) {
		int x = (i * 2) % 100;
		int y = (i * 2) / 100 * 2;
		x = 99 - x;
		y = 99 - y;
		field[y][x] = true;
	}
	writeln(field.length, " ", field[0].length);
	foreach (arr; field) {
		foreach (v; arr) {
			write = v ? "#" : ".";
		}
		writeln;
	}
}
