import Control.Applicative
import Data.Maybe

chessBorad :: Int -> [Int] -> String
chessBorad i l@(h:w:_)
  | h == 0 && w == 0 = "end"
  | i >= h           = "\n"
  | even i           = ((++ "\n") . take w . concat . repeat $ "#.")  ++ chessBorad (i+1) l
  | otherwise        = ((++ "\n") . take w . concat . repeat $ ".#")  ++ chessBorad (i+1) l

main = getContents >>=
       mapM_ (putStr) . takeWhile (/= "end") . map (chessBorad 0 . map read . words) . lines