#include <bits/stdc++.h>

#define M_PI       3.14159265358979323846

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; }
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); }
inline int readInt() { int x; scanf("%d", &x); return x; }

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<int, PII> TIII;
typedef long long LL;
typedef unsigned long long ULL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;


//container util

//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define SQ(a) ((a)*(a))
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,s,n) for(int i=s;i<(int)n;++i)
#define REP(i,n) FOR(i,0,n)
#define MOD 1000000007

#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define all(x) x.begin(), x.end()
#define sz(x) (int)(x).size()

typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;

#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)


struct Edge {
    int to, from;
    ll cost;
    Edge(int from, int to, ll cost): from(from), to(to), cost(cost) {}
};

typedef vector<vector<Edge>> AdjList;
AdjList graph;

char m[110][110];


int main() {
    //cin.tie(0);
    //ios::sync_with_stdio(false);
    //cout << fixed << setprecision(10);

    
    int A, B; cin >> A >> B;

    
    for(int i=0; i<50; ++i){
        for(int j=0; j<100; ++j){
            m[i][j] = '#';
        }
    }

    for(int i=50; i<100; ++i){
        for(int j=0; j<100; ++j){
            m[i][j] = '.';
        }
    }
    cout << 100 << " " << 100 << endl;
    A--;
    B--;
    for(int i=0; i<49; ++i){
        for(int j=0; j<100; ++j){
            if(A<=0) break;
            bool f = true;

            for(int n=-1; n<=1; ++n){
                for(int k=-1; k<=1; ++k){
                    int ny = i+n, nx = j+k;

                    if(ny >=0 && ny < 50 && nx >=0 && nx < 100 && m[ny][nx] == '.') f = false;
                }
            }
            if(f){
                m[i][j] = '.';
                A--;
            } 
        }
    }

    for(int i=51; i<100; ++i){
        for(int j=0; j<100; ++j){
            if(B<=0) break;
            bool f = true;

            for(int n=-1; n<=1; ++n){
                for(int k=-1; k<=1; ++k){
                    int ny = i+n, nx = j+k;

                    if(ny >=0 && ny < 100 && nx >=0 && nx < 100 && m[ny][nx] == '#') f = false;
                }
            }
            if(f){
                m[i][j] = '#';
                B--;
            }
        }
    }
    for(int i=0; i<100; ++i){
        for(int j=0; j<100; ++j){
            cout << m[i][j];
        }
        cout << endl;
        
    }
    return 0;

}

Measured memory_bytes: 764