let print_a_chess h w =
  let buf = Buffer.create 256 in
  let rec loop i j =
    if i >= h then Buffer.contents buf
    else if j = w then (Buffer.add_char buf '\n'; loop (i+1) 0)
    else (if (i+j) mod 2 = 0 then Buffer.add_char buf '#'
          else Buffer.add_char buf '.';
          loop i (j+1))
  in print_endline (loop 0 0)

let () =
  let rec loop () =
    let line = read_line () in
    let h,w = Scanf.sscanf line "%d %d" (fun h w -> h,w) in
    if (h,w) = (0,0) then ()
    else loop (print_a_chess h w);
  in loop ()