printChessLine :: Int -> Int -> Int -> Int -> String
printChessLine h hh w ww
  | w == 0 = "\n"
  | (mod (ww - w) 2) == 0 && (mod (hh - h) 2) == 0 = "#" ++ printChessLine h hh (w - 1) ww
  | (mod (ww - w) 2) == 1 && (mod (hh - h) 2) == 0 = "." ++ printChessLine h hh (w - 1) ww
  | (mod (ww - w) 2) == 0 && (mod (hh - h) 2) == 1 = "." ++ printChessLine h hh (w - 1) ww
  | (mod (ww - w) 2) == 1 && (mod (hh - h) 2) == 1 = "#" ++ printChessLine h hh (w - 1) ww

printChess h hh w ww
  | h == 0 = ""
  | otherwise = printChessLine h hh w ww ++ printChess (h - 1)  hh w ww

main = do
  hw <- getLine
  if hw == "0 0"
    then
      return []
    else do
      let lhw = map (read :: String -> Int) $ words hw
      putStrLn $ printChess (lhw !! 0) (lhw !! 0) (lhw !! 1) (lhw !! 1)
      main