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)

readDigits = map read <$> words <$> getLine :: IO [Int]

mkChessBoard :: Int -> Int -> Board
mkChessBoard w h =
    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

main :: IO ()
main =
    loop
    where
    loop = do
        [h,w] <- readDigits
        unless (h == 0 && w == 0) $ do
            let box = mkChessBoard w h
            let ((sx,sy), (ex,ey)) = bounds box
            putStrLn $ unlines [[box!(x,y) | x<-[sx..ex]] | y<-[sy..ey]]
            loop