#include<iostream>
#include<cstdio>
using namespace std;
int A,B,na,nb;
char a[105][105];
int main()
{
	scanf("%d%d",&A,&B);
	for (int i=1;i<=50;i++)
	  for (int j=1;j<=100;j++)
	    a[i][j]='#';
    for (int i=51;i<=100;i++)
      for (int j=1;j<=100;j++)
        a[i][j]='.';
    na=1; nb=1;
    for (int i=1;i<=50;i+=2)
    {
		if (na==A) break;
		for (int j=1;j<=100;j+=2)
    	{
    		if (na==A) break;
			++na; a[i][j]='.';
		}
	}
	for (int i=100;i>=51;i-=2)
	{
		if (nb==B) break;
		for (int j=1;j<=100;j+=2)
		{
			if (nb==B) break;
			++nb; a[i][j]='#';
		}
	}
	printf("100 100\n");
	for (int i=1;i<=100;i++)
	{
		for (int j=1;j<=100;j++)
		  cout<<a[i][j];
		cout<<endl;
	}
	return 0;
}