let draw h w =
  let rec draw' h w isSharp =
    match h with
    |0 -> print_string "\n"
    |_ -> let rec draw_dot_s w isSharp=
            match w with
            |0 -> print_string "\n";
            |_ -> if isSharp then print_string "#"
                  else print_string ".";
                  draw_dot_s (w-1) (not isSharp)
          in
          draw_dot_s w isSharp;
          draw' (h-1) w (not isSharp)
  in
  draw' h w true
;;

let rec loop ()=
  Scanf.sscanf (read_line()) "%d %d" (fun h w -> if h = 0 || w = 0 then ()
                                                 else begin
                                                     draw h w;
                                                     loop()
                                                   end
    )
;;

loop ();;
