#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;

typedef long long ll;

int main() {
    int A, B;
    cin >> A >> B;
    cout << "100 100\n";
    rep(i, 50) {
        rep(j, 100) {
            if (A == 1 || (i * j) % 2 == 0) cout << "#";
            else {
                cout << ".";
                A--;
            }
        }
        cout << "\n";
    }
    rep(i, 50) {
        rep(j, 100) {
            if (B == 1 || (i * j) % 2 == 0) cout << ".";
            else {
                cout << "#";
                B--;
            }
        }
        cout << "\n";
    }
}