#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(), x.end()
#ifdef LOCAL
#define see(x) cout  << #x << ": " << (x) << endl
#endif

#ifndef LOCAL
#define see(x)
#endif

template<class T>
int sign(const T &a) {
    if(a==0) return 0;
    if(a>0) return 1;
    return -1;
}

template<typename T>
void print(const T &t) {
    cout << t << '\n';
}

template<typename T, typename ...Args>
void print(const T &t, const Args &...rest) {
    cout << t << ' ';
    print(rest...);
}

// this overload is chosen when there's only one argument
template <class T>
void scan(T &t){
    cin >> t;
}

template<class T, class ...Args>
void scan(T &a, Args &...rest){
    cin >> a;
    scan(rest...);
}


using vec = vector<int>;
using mat = vector<vec>;
using pii = pair<int,int>;

using ll = long long;
const int mod = 1e9+7;
const int N = 1e4+5;
const int M = 1<<20;

int c[105][105];

int a, b;

int fa[N];

int get_color(int x){
    int r = (x+100-1)/100;
    int col = x - (r-1) * 100;
    return c[r][col];
}

int find(int x){
    return x == fa[x]? x: fa[x] = find(fa[x]);
}

int unite(int x, int y){
    x = find(x);
    y = find(y);
    if(x != y){
        fa[x] = y;
    }
}

int get_id(int x, int y){
    return (x-1)*100 + y;
}

bool is_bridge(int x, int y){
    if(x>1 && y>1){
        if(c[x][y] == c[x-1][y] && c[x][y] == c[x][y-1]) {
            int t1 = find(get_id(x-1, y));
            int t2 = find(get_id(x, y-1));
            return t1 != t2;
        }
    }
    return false;
}

void paint(int x, int y, int t){
    c[x][y] = t;
    if(is_bridge(x, y)) {
        if(t==1) ++a;
        else ++b;
    }
    if(x>1 && c[x-1][y] == c[x][y]) {
        unite(get_id(x, y), get_id(x-1, y));
    }
    if(y>1 && c[x][y-1] == c[x][y]){
        unite(get_id(x, y), get_id(x, y-1));
    }
}

bool alone(int x, int y, int t){
    if(x>1 && c[x-1][y] == t) return false;
    if(y>1 && c[x][y-1] == t) return false;
    return true;
}

void init(){
    for(int i=1; i<=10000; i++)
        fa[i]= i;
}

int main(){
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
#endif
    scan(a, b);
    init();
    for(int i = 1; i<=100; i++) {
        if(a == 0 && b == 0){
            print(i-1, 100);
            for(int k=1; k < i; k++){
                for (int j = 1; j <= 100; j++) {
                    putchar(c[k][j]==1?'.':'#');
                }
                puts("");
            }
            return 0;
        }
        for (int j = 1; j <= 100; j++) {

            if (alone(i, j, -1) && b) {
                c[i][j] = -1;
                --b;
//                print(i, j);
            } else if (alone(i, j, 1) && a) {
                c[i][j] = 1;
                --a;
            } else if (alone(i, j, -1)) {
                paint(i, j, 1);
            } else if (alone(i, j, 1)) {
                paint(i, j, -1);
            } else {
                if(a>b)
                    paint(i, j, -1);
                else
                    paint(i, j, 1);

            }
        }
    }
    print(100, 100);
    assert(a==0 && b==0);
    for (int i = 1; i <= 100; i++) {
        for (int j = 1; j <= 100; j++) {
            putchar(c[i][j]==1?'.':'#');
        }
        puts("");
    }
    return 0;
}