printNum::(Bool,Int)->IO()
printNum (a,b) = putStrLn $ take b $ array a
	where
	array a
		|a==True = cycle['#','.']
		|a==False = cycle['.','#']

printRec::(Int,Int)->IO ()
printRec (a,b) = sequence_ $ (\x->x++[putStrLn ""]) $ map printNum $ map (\x->(x`mod`2==1,b)) $ take a [1,2..]



function::String->IO ()
function x=mapM_ printRec $ takeWhile(/=(0,0))$map (\[x,y]->(read x::Int,read y::Int)) $ map words $ lines x

main = getContents >>= function