// Original C++ solution (slower):
#include<iostream>

#include<stdio.h>

#include<cstring>

#include<cmath>

#include<algorithm>

#include<vector>

#include<map>

#include<set>

#include<queue>

#define ll long long

using namespace std;

int pos(int n)

{

    if(n<0)

        return 0;

    else

        return n;

}

int main()

{

    int a,b;

    cin>>a>>b;

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

    int s[102][102]={0};//0为黑1为白.

    for(int i=51;i<=100;i++){

        for(int j=1;j<=100;j++){

            s[i][j]=1;

        }

    }

    a--,b--;

    for(int i=1;i<=50;i+=2){

        int j=1;

        for( ;j<=100;j+=2){

            if(a>0){

                s[i][j]=1;

                a--;

            }else{

                break;

            }

        }

    }

    for(int i=100;i>=51;i-=2){

        for(int j=1;j<=100;j+=2){

            if(b>0){

                s[i][j]=0;

                b--;

            }else{

                break;

            }

        }

    }

    for(int i=1;i<=100;i++){

        int j=1;

        for ( ;j<=100;j++){

            if(s[i][j]==1)

                cout<<".";

            else

                cout<<"#";

        }

        cout<<endl;

    }

}


// Optimized solution to the same problem (faster):
///

/**

 * @Samaritan

 */

#include<bits/stdc++.h>

using namespace std;

typedef long long LL;



#define pb emplace_back

#define fi first

#define se second

#define PII pair<int, int>

#define PLL pair<LL, LL>



LL quick_pow (LL a, LL b, LL mod) {

    LL ans = 1, base = a;

    while (b) {

        if (b & 1) (ans *= base) %= mod;

        b >>= 1;

        (base *= base) %= mod;

    }

    return ans;

}



const int mod = 1e9 + 7;

const int N = 2e2 + 5;



struct node {

    int pos, v;

    bool operator < (const node& k) const {

        return v > k.v;

    }

};



char pic[N][N];



int main() {

    int a, b;

    scanf("%d %d", &a, &b);

    memset(pic, 0, sizeof pic);

    int n = 100;

    int cnt = b - 1;

    int max_col = 2;

    for (int i = 1; i <= n; ++i) {

        if (!cnt) break;

        for (int j = 1; j <= n; ++j) {

            if (i & 1 && j & 1) {

                pic[i][j] = '#';

                cnt--;

                if (!cnt) {

                        max_col = i + 1;

                    break;

                }

            }

        }

        if (!cnt) break;

    }

    for (int i = 1; i <= max_col; ++i) {

        for (int j = 1; j <= n; ++j) {

            if (!pic[i][j]) pic[i][j] = '.';

        }

    }

    cnt = a - 1;

    for (int i = max_col + 2; i <= n; ++i) {

        if (!cnt) break;

        for (int j = 1; j <= n; ++j) {

            if (i & 1 && j & 1) {

                pic[i][j] = '.';

                cnt--;

                if (!cnt) {

                    break;

                }

            }

        }

        if (!cnt) break;

    }

    for (int i = max_col + 1; i <= n; ++i) {

        for (int j = 1; j <= n; ++j) {

            if (!pic[i][j]) pic[i][j] = '#';

        }

    }

    printf("100 100\n");

    for (int i = 1; i <= n; ++i) printf("%s\n", pic[i] + 1);

    return 0;

}


// Fastest known solution for this problem: