main :: IO ()
main = do
    line <- getLine
    case (words line) of
      ["0", "0"] -> return ()
      [h, w] -> do
          printChessboard (read h :: Int) (read w :: Int)
          main

printChessboard :: Int -> Int -> IO ()
printChessboard w h = do
    mapM_ putStrLn $ map (\x -> printLine x h) [0..w-1]
    putStrLn ""

printLine :: Int -> Int -> String
printLine n h =
    map (\x -> if even x then '#' else '.') [n+0..n+h-1]