main = do
  s <- getContents
  let t =  map aux $ takeWhile (/=[0,0]) $ map (map (read::String->Int) .  words) . lines $ s
  mapM_ putStrLn t

aux :: [Int] ->String  
aux [h,w] = concat $ map ((++"\n").take w) $ take h $ v
    where
      s = (concat (repeat "#."))
      t = (concat (repeat ".#"))
      u = [s, t]
      v = (concat . repeat) u