let () =
  Scanf.scanf "%d %d" @@ fun a b ->
  let w = 100 in
  let res = Array.init 50 (fun _ -> Array.make 100 '.') in

  let r = (b+48)/50 - 1 in

  (* A *)
  let la = 2*r + 4 in
  for i = 0 to (a-2) do
    let x = i / (w/2) * 2 in
    let y = i mod (w/2) * 2 in
    res.(la + x).(y) <- '#';
  done;

  (* B *)
  for i = 0 to 2*r+1 do res.(i).(0) <- '#' done;
  for i = 0 to r do
    for j = 0 to w-1 do res.(2*i+1).(j) <- '#' done;
  done;
  for i = 0 to r-1 do
    for j = 0 to (w-2)/2 do res.(2*i).(2*j) <- '#' done;
  done;
  if r >= 0 then
    for i = 0 to (b+48) mod 50 do
      res.(2*r).(2*i) <- '#';
    done
  else res.(0).(0) <- '#';

  print_endline "50 100";
  res |> Array.iter @@ fun r ->
    r |> Array.iter print_char;
    print_newline ();