import Control.Applicative
import Control.Monad

rInt s = read s :: Int

main  = do
	ss <- (map (map rInt) . map words . lines) <$> getContents
	mapM (mapM putStrLn . board) $ takeWhile (\(h:(w:_)) -> h/=0 && w/=0) ss 
		where 
			board (h:(w:_)) = (map (f w) [1..h]) ++ [""]
			f w i = map c $ map (+i) [1..w]
			c i = if even i then '#' else '.'