import std.stdio, std.conv, std.string;
import std.algorithm, std.array, std.container;
import std.numeric, std.math;
import core.bitop;

T RD(T = string)() { static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res.to!T; }
string RDR()() { return readln.chomp; }
T[] ARR(T)(in string str) { return str.split.to!(T[]); }
size_t[] MAKE_IDX(alias less = "a < b", Range)(Range range) { auto idx = new size_t[](range.length); makeIndex!(less)(range, idx); return idx;}
size_t MIN_POS(alias less = "a < b", Range)(Range range) { auto r = minPos!(less)(range); return range.length - r.length; }

long mod = pow(10, 9) + 7;
void moda(ref long x, long y) { x = (x + y) % mod; }
void mods(ref long x, long y) { x = ((x + mod) - (y % mod)) % mod; }
void modm(ref long x, long y) { x = (x * y) % mod; }

struct UnionFind
{
	void init(long n) { par = new long[](n); foreach (i; 0..n) par[i] = i; }
	long root(long i) { return par[i] == i ? i : (par[i] = root(par[i])); }
	bool same(long i, long j) { return root(i) == root(j); }
	void unite(long i, long j) { i = root(i); j = root(j); if (i == j) return; par[i] = j; }
	long[] par;
}

void main()
{
	auto A = RD!long;
	auto B = RD!long;

	if (A == 1 && B == 1)
	{
		writeln(1, " ", 2);
		writeln(".#");
		return;
	}

	long diff = abs(A - B);
	auto eq   = min(A, B) * 2; 

	long x, y;
	foreach_reverse (i; 1..101)
	{
		if (eq % i == 0)
		{
			x = i;
			y = eq / i;
			break;
		}
	}

	auto c1 = A > B ? '.' : '#';
	auto c2 = A > B ? '#' : '.';
	stderr.writeln(c1, c2);
	stderr.writeln(x, " ", y);

	writeln(100, " ", 100);
	foreach (i; 0..y)
	{
		foreach (j; 0..100)
		{
			if (j >= x)
				write(c1);
			else
				write((i + j) % 2 == 0 ? c1 : c2);
		}
		writeln();
	}
	write(y % 2 == 0 ? [c2, c1] : [c1, c2]);
	foreach (j; 2..100)
	{
		write(c1);
	}
	writeln();
	foreach (j; 0..100)
	{
		write(c2);
	}
	writeln();
	stderr.writeln(diff);
	long cnt;
	if (x < 100)
	{
		cnt += y / 2;
		cnt += x % 2 == 1 ? y % 2 : 0;
		cnt += (x + y) % 2 == 0 ? -1 : 0;
	}
	cnt += x / 2;
	cnt += y % 2 == 1 ? x % 2 : 0;
	cnt += y % 2 == 1 ? -1 : 0;
	--cnt;
	diff += cnt;
	stderr.writeln(diff);
	if (y+2 > 80) foreach (i; 0..100_000_000) stderr.writeln(i);
	foreach (i; y+2..100)
	{
		foreach (j; 0..100)
		{
			if (j == 0)
			{
				write(c2);
				continue;
			}
			if (diff != 0 && (i + j) % 3 == 0)
			{
				--diff;
				write(c1);
			}
			else
				write(c2);
		}
		writeln();
	}

	stdout.flush();
}