import Data.List (intercalate)

draw :: Int -> Int -> IO ()
draw h w = drawEachLine 1
  where drawEachLine n
          | n <= h    = drawLine n w >> drawEachLine (n + 1)
          | otherwise = putStrLn ""  >> return ()
        drawLine n w = putStrLn $ intercalate "" [selectChar (i+n) | i <- [1..w]]
        selectChar n
          | n `mod` 2 == 0 = "#"
          | otherwise      = "."

main :: IO ()
main = do
    line <- getLine
    let [h, w] = map (\n -> read n :: Int) $ words line
    if h == 0 && w == 0 then
        return ()
    else do
        draw h w
        main

