#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define rep(i,a) for(int i=0;i<(a);i++)
const ll MOD=1000000007;

const char a='.', b='#';

int main(){
  int A,B; cin>>A>>B; A--,B--;
  cout<<"100 100"<<endl;
  rep(i,50){
    rep(j,100){
      if(A>0&&(i%2==0)&&(j%2==1)){
        cout<<a;
        A--;
      }else cout<<b;
    }
    cout<<endl;
  }
  rep(i,50){
    rep(j,100){
      if(B>0&&(i%2==1)&&(j%2==1)){
        cout<<b;
        B--;
      }else cout<<a;
    }
    cout<<endl;
  }
  return 0;
}
