#include "bits/stdc++.h"
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define vi vector<int>
typedef long long ll;
int ans[105][105];
signed main(){
    int a,b;cin>>a>>b;
    rep(i,50)rep(j,100)ans[i][j]=1;
    rep(i,a-1){
        int r=i/50,c=i%50;
        ans[r*2][c*2]=0;
    }
    rep(i,b-1){
        int r=i/50,c=i%50;
        ans[50+r*2+1][c*2+1]=1;
    }

    cout<<100<<' '<<100<<endl;
    rep(i,100){
        rep(j,100){
        if(ans[i][j])cout<<'#';
        else cout<<'.';       
        }cout<<endl;
    }
}