#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<utility>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<functional>
#include<math.h>
using namespace std;
#define N (1000000000+7)
#define M (998244353)
#define INF 1e16
typedef long long ll;
typedef pair<int,int> P;

char board[105][105];

int main(void){
    int a,b;
    cin>>a>>b;
    if(a==1 && b==1){
        cout<<1<<" "<<2<<endl;
        cout<<'.'<<'#'<<endl;
        return 0;
    }
    int len = 0;
    bool flag=false;
    if(a>=b){
        while(a>50){
            for(int i=0;i<100;i++){
                if(i%2==0)board[len][i]='.';
                else board[len][i]='#';
            }
            len++;
            for(int i=0;i<100;i++){
                board[len][i]='#';
            }
            len++;
            a-=50;
        }
        if(a>1){
            for(int i=0;i<100;i++){
                if(a==1)board[len][i]='#';
                else{
                    if(i%2==0)board[len][i]='.',a--;
                    else board[len][i]='#';
                }
            }
            len++;
            for(int i=0;i<100;i++){
                board[len][i]='#';
            }
            len++;
            for(int i=0;i<100;i++){
                board[len][i]='.';
            }
            len++;
            a--;
        }
        b--;
        if(b!=0){
            while(b>50){
                for(int i=0;i<100;i++){
                    if(i%2==0)board[len][i]='.';
                    else board[len][i]='#';
                }
                len++;
                for(int i=0;i<100;i++){
                    board[len][i]='.';
                }
                len++;
                b-=50;
            }
        }
        for(ll i=len;i<100;i++){
            for(ll j=0;j<100;j++){
                if(b==0)board[i][j]='.';
                else{
                    if(j%2==0)board[i][j]='.';
                    else board[i][j]='#',b--;
                }
            }
        }
    }
    else{
        while(b>50){
            for(int i=0;i<100;i++){
                if(i%2==0)board[len][i]='.';
                else board[len][i]='#';
            }
            len++;
            for(int i=0;i<100;i++){
                board[len][i]='.';
            }
            len++;
            b-=50;
        }
        if(b>1){
            for(int i=0;i<100;i++){
                if(b==1)board[len][i]='.';
                else{
                    if(i%2==0)board[len][i]='.';
                    else board[len][i]='#',b--;
                }
            }
            len++;
            for(int i=0;i<100;i++){
                board[len][i]='.';
            }
            len++;
            for(int i=0;i<100;i++){
                board[len][i]='#';
            }
            len++;
            b--;
        }
        a--;
        if(a!=0){
            while(a>50){
                for(int i=0;i<100;i++){
                    if(i%2==0)board[len][i]='.';
                    else board[len][i]='#';
                }
                len++;
                for(int i=0;i<100;i++){
                    board[len][i]='#';
                }
                len++;
                a-=50;
            }
        }
        for(ll i=len;i<100;i++){
            for(ll j=0;j<100;j++){
                if(a==0)board[i][j]='#';
                else{
                    if(j%2==0)board[i][j]='.',a--;
                    else board[i][j]='#';
                }
            }
        }
    }

    cout<<100<<" "<<100<<endl;
    int x=0,y=0;
    for(int i=0;i<100;i++){
        for(int j=0;j<100;j++){
            cout<<board[i][j];
        }
        cout<<endl;
    }
    return 0;
}

Measured memory_bytes: 256