main = do
    s <- fmap (takeWhile (\l -> l /= [0, 0]) . map (map read) . map words . lines) getContents
    mapM (mapM putStrLn . line) $ s
    where 
        line (h:w:_) = (map (l w) [1..h]) ++ [""]
        l w i = map dot $ map (+i) [1..w]
        dot p = if even p then '#' else '.'

