#include <stdio.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <functional>
#include <map>
#include <iomanip>
#include <math.h> 
#include <stack>
#include <queue>
#include <bitset>

using namespace std;

char matrix[102][102];
bool matrixb[102][102];
bool matrixw[102][102];
int cntw = 0, cntb = 0;

int funcw(int y, int x, bool flag) {   //flagがtrueの時はカウントしている最中

	if (matrixw[y][x] == true) return 0;

	matrixw[y][x] = true;

	if (matrix[y][x] == '.' && flag == false) {
		cntw++;
		if (y>0 && matrixw[y - 1][x] == false) funcw(y - 1, x, true);
		if (matrixw[y][x + 1] == false) funcw(y, x + 1, true);
		if (matrixw[y + 1][x] == false) funcw(y + 1, x, true);
		if (x>0 && matrixw[y][x - 1] == false) funcw(y, x - 1, true);


	}
	else if (matrix[y][x] == '.' && flag == true) {
		if (y>0 && matrixw[y - 1][x] == false) funcw(y - 1, x, true);
		if (matrixw[y][x + 1] == false) funcw(y, x + 1, true);
		if (matrixw[y + 1][x] == false) funcw(y + 1, x, true);
		if (x>0 && matrixw[y][x - 1] == false) funcw(y, x - 1, true);

		flag = false;
	}


}

int funcb(int y, int x, bool flag) {   //flagがtrueの時はカウントしている最中

	if (matrixb[y][x] == true) return 0;

	matrixb[y][x] = true;

	if (matrix[y][x] == '#' && flag == false) {
		cntb++;
		if (y>0 && matrixb[y - 1][x] == false) funcb(y - 1, x, true);
		if (matrixb[y][x + 1] == false) funcb(y, x + 1, true);
		if (matrixb[y + 1][x] == false) funcb(y + 1, x, true);
		if (x>0 && matrixb[y][x - 1] == false) funcb(y, x - 1, true);


	}
	else if (matrix[y][x] == '#' && flag == true) {
		if (y>0 && matrixb[y - 1][x] == false) funcb(y - 1, x, true);
		if (matrixb[y][x + 1] == false) funcb(y, x + 1, true);
		if (matrixb[y + 1][x] == false) funcb(y + 1, x, true);
		if (x>0 && matrixb[y][x - 1] == false) funcb(y, x - 1, true);

		flag = false;
	}

	
}

int main() {

	startl:

	int i, j, k;
	int a, b;
	int yoko = 0, tate = 0;


	cin >> a >> b;

	/*
	if (abs(a - b) == 1 && a+b <= 100) {
		bool hbflag2;	// trueの時は白、falseの時は黒

		if (a > b) {
			hbflag2 = true;
		}
		else {
			hbflag2 = false;
		}

		if ((a + b) <= 100) {
			if (hbflag2 == true) {
				cout << "1 " << a + b << endl;
				cout << ".";
				for (i = 0; i < a-1; i++) {
					cout << "#";
					cout << ".";
				}
				cout << endl;
			}
			if (hbflag2 == false) {
				cout << "1 " << a + b << endl;
				cout << "#";
				for (i = 0; i < b-1; i++) {
					cout << ".";
					cout << "#";
				}
				cout << endl;
			}
		}

		getchar();
		getchar();
		return 0;

	}
	else if ((a - b) == 0) {
		if (a + b <= 100) {
			cout << "1 " << a + b << endl;
			for (i = 0; i < a; i++) {
				cout << ".";
				cout << "#";
			}
			cout << endl;

			getchar();
			getchar();
			return 0;

		}
	}
	*/

	bool hbflag;	// trueの時は白、falseの時は黒
	int cnt1 = 1, cnt2 = 0, maxn, minn;
	string ch1, ch2;

	if (a > b) {
		hbflag = true;
		ch1 = "#";
		ch2 = ".";
		maxn = a;
		minn = b;

		for (i = 0; i < 100; i++) {
			for (j = 0; j < 100; j++) {
				matrix[i][j] = '#';
			}
		}
	}
	else {
		hbflag = false;
		ch1 = ".";
		ch2 = "#";
		maxn = b;
		minn = a;

		for (i = 0; i < 100; i++) {
			for (j = 0; j < 100; j++) {
				matrix[i][j] = '.';
			}
		}
	}


	if (a == 1 || b == 1) {
		for (i = 2; i < 100; i += 2) {
			for (j = 2; j < 100; j += 2) {
				matrix[i][j] = ch2[0];
				cnt2++;
				if (cnt2 >= maxn) {
					goto label1;
				}
			}
		}

	}


	for (i = 1; i < 100; i += 2) {
		for (j = i, k = 0; j >= 0; j--, k++) {
			matrix[k][j] = ch2[0];
			cnt2++;
			if (k != 0) {
				cnt1++;
				if (cnt1 >= minn) {
					if (cnt2 == maxn) goto label1;

					if (cnt2 > maxn) {
						for (int i3 = k, j3 = j; i3 > 0; i3--, j3++) {
							matrix[i3][j3 + 1] = ch2[0];
							cnt2--;
							if (cnt2 == maxn) goto label1;
						}
						for (int i3 = i - 2, j3 = 0; i3 > 0; i3--, j3++) {
							if (i3 == k) goto label1;

							matrix[i3][j3 + 1] = ch2[0];
							cnt2--;
							if (cnt2 == maxn) goto label1;
						}
					}

					if (cnt2 == maxn + 1) {
						matrix[k][j + 1] = ch2[0];

						goto label1;
					}
					else if (cnt2 < maxn) {

						for (int i2 = i + 2; i2 < 99; i2 += 2) {
							for (int j2 = k + 2; j2 < 99; j2 += 2) {
								if (cnt2 >= maxn) {
									goto label1;
								}

								if (matrix[i2 - 1][j2] != ch2[0] && matrix[i2][j2 + 1] != ch2[0] && matrix[i2 + 1][j2] != ch2[0] && matrix[i2][j2 - 1] != ch2[0]) {
									matrix[i2][j2] = ch2[0];
									cnt2++;
								}
								
								
							}

						}


					}

				}
			}




		}
	}

	/*
	for (i = 0; i < 100; i+=2) {
		for (j = 0; j < 100; j+=2) {

			matrix[i][j] = ch1[0];
			cnt1++;

			matrix[i][j + 1] = ch2[0];
			cnt2++;
			if (cnt2 >= maxn) {
				goto label1;
			}


			matrix[i + 1][j] = ch2[0];
			cnt2++;
			if(j != 0) cnt1++;

			if (cnt2 >= maxn) {
				goto label1;
			}



			if (cnt1 >= minn) {
				for (int i2 = i + 2; i2 < 100; i2 += 2) {
					for (int j2 = j + 2; j2 < 100; j2 += 2) {
						if (cnt2 >= maxn) {
							goto label1;
						}
						matrix[i2][j2] = ch2[0];
						cnt2++;
					}

				}

			}

		}
	}
	*/
	label1:

	cout << 100 << " " << 100 << endl;

	/*
	for (i = 0; i < 100; i++) {
		for (j = 0; j < 100; j++) {
			funcb(i, j, false);
			funcw(i, j, false);
		}
	}
	
	cout << "cntw->" << cntw << " cntb->" << cntb << endl;
	*/

	for (i = 0; i < 100; i++) {
		for (j = 0; j < 100; j++) {
			cout << matrix[i][j];
		}
		cout << endl;
	}
	


	getchar();
	getchar();

	/*
	cntw = 0; cntb = 0;
	for (i = 0; i < 100; i++) {
		for (j = 0; j < 100; j++) {
			matrixb[i][j] = false;
			matrixw[i][j] = false;
		}
	}
	goto startl;
	*/
	return 0;
}

Measured memory_bytes: 256