#include<bits/stdc++.h>
using namespace std;
int a,b;
int A[105][105];
int main(){
	cin>>a>>b;
	--a,--b;
	printf("%d %d\n",99,99);
	if(!a)++b;
	int L=2,R=2;
	for(int i=1;i<=a;++i){
		A[L-1][R-1]=A[L][R-1]=A[L+1][R-1]=A[L-1][R]=A[L+1][R]=A[L-1][R+1]=A[L][R+1]=A[L+1][R+1]=1;
		R+=3;
		if(R>99)R-=99,L+=3;
	}
	for(int i=1;i<=b;++i){
		A[L][R]=1;
		R+=3;
		if(R>99)R-=99,L+=3;
	}
	for(int i=1;i<=99;++i){
		for(int j=1;j<=99;++j)putchar(A[i][j]?'#':'.');putchar('\n');
	}
	return 0;
}