main :: IO ()
main = interact $ unlines . map (board . strToIntList) . takeWhile (/="0 0") . lines

strToIntList :: String -> (Int, Int)
strToIntList s = (x, y) where x:y:_ = map read . words $ s

board :: (Int, Int) -> String
board (height, width) = unlines $ map (line width) [1 .. height]

line :: Int -> Int -> String
line width r = take width . concat . repeat $ if odd r then "#." else ".#"