import Control.Applicative
import Control.Monad

chessrow :: Int -> Int -> String
chessrow h 0 = []
chessrow h x = chessrow h (x - 1) ++ [p]
  where p = if even (h + x) then '#' else '.' 

chessboard :: Int -> Int -> String
chessboard 0 w = []
chessboard h w = chessboard (h - 1) w ++ chessrow h w ++ ['\n']
  
main = do
  [h, w] <- map (\x -> read x :: Int) . words <$> getLine
  when (h /= 0 || w /= 0) $ putStr (chessboard h w) >> putChar '\n' >> main