solveImpl :: Int -> [String]
solveImpl 0 = []
solveImpl h = (cycle "#.") : (map (drop 1) $ solveImpl (h - 1))

solve :: [Int] -> [String]
solve [h,w] = map (take w) $ solveImpl h

main :: IO ()
main  = getContents
    >>= return . map (map read) . map words . lines
    >>= return . takeWhile (/= [0,0])
    >>= return . map solve
    >>= mapM_ (\ x -> mapM_ putStrLn x >> putStrLn "")