import Data.Foldable
import Data.List

main :: IO ()
main = interact $ unlines.map (solve.map read.words).takeWhile (/="0 0").lines

solve       :: [Int] -> String
solve [x,y] = unlines $ f x (f y '#' '.') (f y '.' '#')
    where f n a b = take n.cycle $ a : [b]