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


void main() {
    int a, b;
    scan(a, b);

    auto map = new char[][](100, 100);
    fillAll(map, '.');

    foreach (i ; 0 .. 50) {
        foreach (j ; 0 .. 50) {
            map[i][j] = '#';
        }
    }

    a--;

    foreach (i ; 0 .. 25) {
        foreach (j ; 0 .. 25) {
            if (a == 0) {
                goto B1;
            }
            a--;
            map[2*i][2*j] = '.';
        }
    }

    B1:

    b--;

    foreach (i ; 0 .. 25) {
        foreach (j ; 0 .. 50) {
            if (b == 0) {
                goto B2;
            }
            b--;
            map[50 + 2*i + 1][2*j] = '#';
        }
    }

    B2:

    writeln("100 100");
    foreach (i ; 0 .. 100) {
        writeln(map[i]);
    }
}




void scan(T...)(ref T args) {
    import std.stdio : readln;
    import std.algorithm : splitter;
    import std.conv : to;
    import std.range.primitives;

    auto line = readln().splitter();
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}



void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}
