import Data.Array.ST (STUArray, runSTUArray, newArray, writeArray, getBounds)
import Data.Array.Unboxed
import Data.Ix (range)
import Control.Monad.ST (ST,runST)
import Control.Monad
import Control.Applicative

type PosXY = (Int,Int)
type Board = UArray PosXY Char
type STBoard s = ST s (STUArray s PosXY Char)

mkChessBoard :: Int -> Int -> Board
mkChessBoard h w =
    runSTUArray $ do
        box <- newArray ((1,1),(w,h)) '.' :: STBoard s
        rng <- range <$> getBounds box
        forM_ rng $ \idx@(y,x) -> do
            let c = if even (y+x) then '#' else '.'
            writeArray box idx c
        return box

solve :: [Int] -> String
solve [h,w] =
    let box = mkChessBoard h w in
    let ((sx,sy), (ex,ey)) = bounds box in
    unlines [[box!(x,y) | x<-[sx..ex]] | y<-[sy..ey]]

main =
    mapM_ putStrLn =<< map solve . takeInputs . lines <$> getContents
    where
    takeInputs :: [String] -> [[Int]]
    takeInputs = takeWhile (not . all (== 0)) . map (map read . words)