ans :: [Int] -> [String]
ans (x:y:xs) = 
  replicate x $ replicate y '#'

main = do
  c <- getContents
  let t = map (map read) $ map words $ lines c :: [[Int]]
      i = takeWhile (/= [0,0]) t
      o = map ans i
  mapM_ (mapM_ (\s -> putStrLn (s++"\n"))) o