import Control.Monad

merge :: String -> String -> String
merge [] ys = ys
merge (x:xs) ys = x : merge ys xs

line :: String
line = merge (repeat '#') (repeat '.')

solve :: [Int] -> IO ()
solve [h, w] = do
    mapM_ (\i -> putStrLn $ if i `mod` 2 == 0 then take w (drop 1 line) else take w line) [1 .. h]
    putStrLn ""

main :: IO ()
main = getContents >>= mapM_ solve . takeWhile (\[h, w] -> h /= 0 || w /= 0) . map (map read . words) . lines