
solve3 [h,w] = loop h
  where
    addSyapu n
      | n == 0 = []
      | otherwise = "#" ++ addDot (n-1)
    addDot n
      | n == 0 = []
      | otherwise = "." ++ addSyapu (n-1)
    loop x = do
      if x == 0
        then putStrLn ""
        else do
        putStrLn $ addSyapu w
        loop2 (x-1)
    loop2 x = do
      if x == 0
        then putStrLn ""
        else do
        putStrLn $ addDot w
        loop (x-1)



main = do
  hws <- input1
  mapM_ solve3 hws

input1 :: IO [[Int]]
input1 = loop []
  where
    loop list = do
      temp <- getLine
      let [h,w] = map read . words $ temp :: [Int]
      if h == 0 && w == 0
        then return list
        else do
        loop (list ++ [[h,w]])

