void main(){
  import std.stdio, std.string, std.conv, std.algorithm;

  int a, b; rd(a, b);

  const int n=100;
  auto c=new char[][](n, n);
  a--; b--;
  foreach(i; 0..n)foreach(j; 0..n){
    if(i<n/2) c[i][j]='#';
    else c[i][j]='.';
  }
  loop1:for(int i=0; i<n/2; i+=2)for(int j=0; j<n; j+=2){
    if((a--)==0) break loop1;
    c[i][j]='.';
  }
  loop2:for(int i=n/2+1; i<n; i+=2)for(int j=0; j<n; j+=2){
    if((b--)==0) break loop2;
    c[i][j]='#';
  }

  writeln(n, " ", n);
  foreach(i; 0..n) writefln("%(%c%)", c[i]);
}


void rd(T...)(ref T x){
  import std.stdio, std.string, std.conv;
  auto l=readln.split;
  assert(l.length==x.length);
  foreach(i, ref e; x){
    e=l[i].to!(typeof(e));
  }
}
