{-
ITP1_5-C
Structured Program I - Print a Chessboard
Time Limit : 1 sec, Memory Limit : 65536 KB
?????§?????????????????????

??\????????????????????????H cm ?????? W cm ????????§????????????????????¢?????????????????°?????????????????????????????????

#.#.#.#.#.
.#.#.#.#.#
#.#.#.#.#.
.#.#.#.#.#
#.#.#.#.#.
.#.#.#.#.#

?????????????????? 6 cm ?????? 10 cm ???????????¢?????¨??????????????????

????????¢???????????? "#" ??¨????????????????????????????????????
Input

??\???????????°????????????????????????????§???????????????????????????????????????????????????¢????????\????????¨????????§??????

H W

H, W ?????¨?????? 0 ?????¨????????\?????????????????¨????????????
Output

?????????????????????????????????????????? H cm ?????? W cm ?????????????????????????????????

?????????????????????????????????????????????????????\??????????????????
Constraints

H, W ??? 300
Sample Input

3 4
5 6
3 3
0 0

Sample Output

#.#.
.#.#
#.#.

#.#.#.
.#.#.#
#.#.#.
.#.#.#
#.#.#.

#.#
.#.
#.#

-}
import Data.List.Split
import Text.Printf

main = do
  s <- getLine
  let [h,w] = map (\x-> read x::Int) $ splitOn " " s
  if h==0 && w==0 then return()
    else do
      mapM_ (\x->putStrLn $ aux x w) [1..h]
      printf "\n"
      main

aux :: Int -> Int -> String
aux h w = if h `mod` 2==1 then foldl
                         (\acc x-> if x`mod`2==1 then acc++"#"
                                   else acc++".") "" [1..w]
                    else foldl
                         (\acc x-> if x`mod`2==1 then acc++"."
                                   else acc++"#") "" [1..w]