#include <iostream>
#include <iomanip>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <cstdio>
#include <utility>
#include <string>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <numeric>

using namespace std;

typedef uint64_t u64;
typedef int64_t s64;
typedef uint32_t u32;
typedef int32_t s32;
typedef vector<s32> vs32;
typedef vector<u32> vu32;
typedef vector<s64> vs64;
typedef vector<u64> vu64;

const double PI=3.14159265358979323846;

#define MAX(x, y) ((x) < (y) ? (y) : (x))
#define MIN(x, y) ((x) > (y) ? (y) : (x))

#define rep(i, N) for(int i = 0; i < N; ++i)

#define CEIL(x, y) (((x) + (y) - 1) / (y))
#define MOD 1000000007ULL

#define IN(l, r, x) ((l) <= (x) && (x) < (r))

using P = pair<int, int>;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);

    int a, b;
    cin >> a >> b;

    vector< string > ans(100);
    rep (i, 50) ans[i] = string(100, '.');
    for (int i = 50; i < 100; ++i) ans[i] = string(100, '#');

    int wc, bc;
    wc = bc = 1;
    P wcor[2], bcor[2];
    wcor[0] = P{0, 0};
    wcor[1] = P{0, 49};
    bcor[0] = P{0, 99};
    bcor[1] = P{0, 50};
    while (wc < a || bc < b)
    {
        if (bc == b)
        {
            swap(ans[wcor[1].second][wcor[1].first], ans[bcor[0].second][bcor[0].first]);
            if (wcor[1].first + 1 >= 100)
            {
                wcor[1] = P{0, wcor[1].second - 1};
            }
            else
            {
                wcor[1].first += 1;
            }
            bcor[1] = P{wcor[1].first, wcor[1].second + 1};
            if (bcor[0].first + 2 >= 100)
            {
                bcor[0] = P{0, bcor[0].second - 2};//(bcor[0].first & 1 ? P{0, bcor[0].second - 1} : P{1, bcor[0].second - 1});
            }
            else
            {
                bcor[0].first += 2;
            }
            ++wc;
        }
        else if (wc == a)
        {
            swap(ans[wcor[0].second][wcor[0].first], ans[bcor[1].second][bcor[1].first]);
            if (wcor[1].first + 1 >= 100)
            {
                bcor[1] = P{0, bcor[1].second + 1};
            }
            else
            {
                bcor[1].first += 1;
            }
            wcor[1] = P{bcor[1].first, bcor[1].second - 1};
            if (wcor[0].first + 2 >= 100)
            {
                wcor[0] = P{0, wcor[0].second + 2};//(wcor[0].first & 1 ? P{0, wcor[0].second + 1} : P{1, wcor[0].second + 1});
            }
            else
            {
                wcor[0].first += 2;
            }
            ++bc;
        }
        else
        {
            swap(ans[wcor[0].second][wcor[0].first], ans[bcor[0].second][bcor[0].first]);
            if (wcor[0].first + 2 >= 100)
            {
                wcor[0] = P{0, wcor[0].second + 2};//(wcor[0].first & 1 ? P{0, wcor[0].second + 1} : P{1, wcor[0].second + 1});
            }
            else
            {
                wcor[0].first += 2;
            }
            if (bcor[0].first + 2 >= 100)
            {
                bcor[0] = P{0, bcor[0].second - 2};//(bcor[0].first & 1 ? P{0, bcor[0].second - 1} : P{1, bcor[0].second - 1});
            }
            else
            {
                bcor[0].first += 2;
            }
            ++wc, ++bc;
        }
    }

    cout << "100 100\n";
    rep (i, 100)
    {
        cout << ans[i] << "\n";
    }

    return 0;
}



Measured memory_bytes: 256