import std.stdio, std.string, std.range, std.conv, std.array, std.algorithm, std.math, std.typecons;

void main() {
    auto tmp = readln.split.to!(int[]);
    auto A = tmp[0], B = tmp[1];

    enum W = 100, H = 100;

    char[][] cell = new char[][](W, H);

    foreach (y; 0..H) {
        foreach (x; 0..W/2) {
            cell[x][y] = '.';
        }
        foreach (x; W/2..W) {
            cell[x][y] = '#';
        }
    }

    {
        int x = W/2+1, y = 0;
        while (A > 1) {
            cell[x][y] = '.';
            A--;
            if (x+2 >= W) {
                x = W/2+1;
                y += 2;
            } else {
                x += 2;
            }
        }

        x = 0;
        y = 0;
        while (B > 1) {
            cell[x][y] = '#';
            B--;
            if (x+2 >= W/2-1) {
                x = 0;
                y += 2;
            } else {
                x += 2;
            }
        }
    }

    writefln("%d %d", W, H);
    foreach (y; 0..H) {
        foreach (x; 0..W) {
            write(cell[x][y]);
        }
        writeln;
    }
}

