module Main where

import Control.Applicative
import Numeric

main :: IO ()
main = loop

loop :: IO()
loop = do
  { [h, w] <- getInts
  ; if h == 0 && w == 0 then done
    else do
      { putStrLn $ unlines $ checkerboard h w
      ; loop
      }
  }

firstLine :: Int -> String
firstLine n = take n (cycle "#.")

secondLine :: Int -> String
secondLine n = take n (cycle ".#")

checkerboard :: Int -> Int -> [String]
checkerboard h w = take h (cycle [firstLine w, secondLine w])

--

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

putInts :: [Int] -> IO ()
putInts = putStrLn . unwords . map show

getDoubles :: IO [Double]
getDoubles = map read . words <$> getLine

putDoubles :: [Double] -> IO ()
putDoubles = putStrLn . unwords . map showDouble

showDouble :: Double -> String
showDouble d = showFFloat Nothing d ""

done :: IO()
done = return ()

