boardLine w dict =
  take w dict

drawBoardLine 0 _ _ = do return ()
drawBoardLine h w dict = do
  putStrLn (boardLine w dict)
  drawBoardLine (h-1) w (tail dict)

drawChess h w = do
  let inf = cycle ['#','.']
  drawBoardLine h w inf
  putStrLn ""

main = do
  ln <- getLine
  let [h, w] = map read $ words ln :: [Int]
  if h == 0 && w == 0 then
    return ()
  else do
    drawChess h w
    main