#include <bits/stdc++.h>
#define MOD 1000000007
#define ll long long
#define ld long double
#define slld(t) scanf("%lld",&t)
#define sd(t) scanf("%d",&t)
#define sc(x) scanf("%s",x)
#define pd(t) printf("%d\n",t)
#define plld(t) printf("%lld\n",t)
#define mp(a,b) make_pair(a,b)
#define pii pair<int,int> 
#define pli pair<ll,int>
#define pil pair<int,ll>  
#define pll pair<ll,ll>
#define ff first
#define ss second
#define pb(x) push_back(x)
#define ub upper_bound
#define lb lower_bound
#define all(x) x.begin(),x.end()
#define sz(x) (int)x.size()
#define clr(x) memset(x,0,sizeof(x))
#define sws ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define pi acos(-1)
#define rep(I, N) for (ll I = 0; I < (N); ++I)
#define repp(I, a, B) for (ll I = (a); I <= (B); ++I)
#define t1(x)                cout<<#x<<": "<<x<<endl
#define t2(x, y)             cout<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
#define t3(x, y, z)          cout<<#x<<": "<<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
#define t4(a, b, c, d)       cout<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl
#define t5(a, b, c, d, e)    cout<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<endl
#define t6(a, b, c, d, e, f) cout<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<endl
using namespace std;

const int N = 1e2 + 5 ;
const int LN = 30;

int a, b;
int row = 0, rows_a, rows_b;
char c[N][N];

void solve(int t, int rows)
{
    char ch1, ch2;
    int left;
    if(t == 1) ch1 = '.', ch2 = '#', left = b;
    else ch1 = '#', ch2 = '.', left = a;
    while(rows)
    {
        row++;
        for(int j = 1; j <= 100; j++) c[row][j] = ch1; 
        row++;
        c[row][1] = ch1;
        c[row][100] = ch1;
        for(int j = 2; j < 100; j += 2) if(left) {left--; c[row][j] = ch2;}
        row++;
        c[row][1] = ch1;
        c[row][100] = ch1;
        for(int j = 3; j < 100; j += 2) if(left) {left--; c[row][j] = ch2;}
        row++;
        for(int j = 1; j <= 100; j++) c[row][j] = ch1; 
        rows -= 2;
    }
    for(int i = 1; i <= row; i++) for(int j = 1; j <= 100; j++) if(c[i][j] == '-') c[i][j] = ch1;
}

int main()
{
    sws;
    srand(time(NULL));
    cout << fixed << setprecision(10);
    clock_t clk;
    clk = clock();
    

    //freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);


    cin >> a >> b;
    memset(c, '-', sizeof(c));

    a--; b--;
    int rows_b = 2 * (b / 98);
    if(b % 98) rows_b += 2; 
    int rows_a = 2 * (a / 98);
    if(a % 98) rows_a += 2;

    if(a == 0 || b == 0)
    {
        if(a == 0 && b == 0) {cout << "1 2\n.#"; return 0;}
        else if(a == 0) 
        {
            if(b % 98 == 0) rows_b += 2;
            b++;
            solve(1, rows_b);
        }
        else
        {
            if(a % 98 == 0) rows_a += 2;
            a++; 
            solve(2, rows_a);
        }
        cout << row << " " << 100 << "\n"; repp(i,1,row) {repp(j,1,100) cout << c[i][j]; cout << "\n";}
        return 0;
    }
    solve(1, rows_b);
    solve(2, rows_a);

    cout << row << " " << 100 << "\n";
    repp(i,1,row) {repp(j,1,100) cout << c[i][j]; cout << "\n";}


    clk = clock() - clk;
    cerr << fixed << setprecision(6) << "Time: " << ((double)clk)/CLOCKS_PER_SEC << "\n";
    
    return 0;
}

Measured memory_bytes: 256