main = mapM_ process . takeWhile (/= "0 0") . lines =<< getContents
  where process line = do
                          putStrLn $ unlines $ map (\x->case () of
                                                              _| odd x -> map (\y->case () of
                                                                                            _| odd y->'#'
                                                                                             | even y ->'.'
                                                                                             | otherwise ->' ') [1..w]
                                                               | even x -> map (\y->case () of
                                                                                             _| odd y ->'.'
                                                                                              | even y ->'#'
                                                                                              | otherwise ->' ') [1..w]
                                                                                             )
                                                                                               [1..h]
                          where [h,w] = map (read::String->Int) $ words line