#include <bits/stdc++.h>

using namespace std;

const bool debug = true;
#define dbg(...) if(debug) printf(__VA_ARGS__)
#define print(var) if (debug) cout << #var << " = " << var << endl

namespace {
    int A, B;
    void input() {
        cin >> A >> B;
    }

    bool check(const vector<string>& f) {
        int h = f.size();
        int w = f[0].size();
        vector<vector<bool>> v(h, vector<bool>(w, false));
        function<void(char, int, int)> fill = [&](char c, int i, int j) {
            const int dy[] = {-1, 0, 1, 0};
            const int dx[] = {0, 1, 0, -1};
            for (int k = 0; k < 4; k++) {
                int ni = i + dy[k];
                int nj = j + dx[k];
                if (ni < 0 || ni >= h) continue;
                if (nj < 0 || nj >= w) continue;
                if (f[ni][nj] != c) continue;
                if (v[ni][nj]) continue;
                v[ni][nj] = true;
                fill(c, ni, nj);
            }
        };
        function<int(char)> count = [&](char c) {
            int ans = 0;
            for (int y = 0; y < h; y++) {
                for (int x = 0; x < w; x++) {
                    if (f[y][x] != c) continue;
                    if (v[y][x]) continue;
                    v[y][x] = true;
                    ans++;
                    fill(c, y, x);
                }
            }
            return ans;
        };
        v = vector<vector<bool>>(h, vector<bool>(w, false));
        int ca = count('.');
        int cb = count('#');
        cout << ca << " " << cb << endl;
        return ca == A && cb == B;
    }

    void solve() {
        int H = 100, W = 100;
        vector<string> base(H, string(W, '.'));
        for (int i = 0; i < H; i++) {
            for (int j = W/2; j < W; j++) {
                base[i][j] = '#';
            }
        }
        int a = 1, b = 1;
        // black.
        while (true) {
            if (b == B) goto end0;
            const vector<int> dy = {-1, -1, 0, 1, 1, 1, 0, -1};
            const vector<int> dx = {0, 1, 1, 1, 0, -1, -1, -1};
            for (int y = 1; y < H - 1; y++) {
                for (int x = 1; x < W/2 - 1; x++) {
                    for (int k = 0; k < 8; k++) {
                        int ny = y + dy[k];
                        int nx = x + dx[k];
                        if (base[ny][nx] != '.') {
                            goto next0;
                        }
                    }
                    b++;
                    base[y][x] = '#';
                    if (b == B) goto end0;
                    next0:;
                }
            }
        }
        end0:;

        while (true) {
            if (a == A) goto end1;
            const vector<int> dy = {-1, -1, 0, 1, 1, 1, 0, -1};
            const vector<int> dx = {0, 1, 1, 1, 0, -1, -1, -1};
            for (int y = 1; y < H - 1; y++) {
                for (int x = W/2 + 1; x < W - 1; x++) {
                    for (int k = 0; k < 8; k++) {
                        int ny = y + dy[k];
                        int nx = x + dx[k];
                        if (base[ny][nx] != '#') {
                            goto next1;
                        }
                    }
                    a++;
                    base[y][x] = '.';
                    if (a == A) goto end1;
                    next1:;
                }
            }
        }
        end1:;

        cout << H << " " << W << endl;
        for (int i = 0; i < H; i++) {
            cout << base[i] << endl;
        }
        //cout << check(base) << endl;
    }
}

int main() {
    input(); solve();
    return 0;
}



Measured memory_bytes: 256