printLine :: Int -> String
printLine 0 = "\n"
printLine n = "#" ++ printLine (n - 1)

printRect :: Int -> Int -> String
printRect 0 _ = ""
printRect h w = printLine w ++ printRect (h - 1) w

main = do
  hw <- getLine
  let lhw = map (read :: String -> Int) $ words hw
  putStrLn $ printRect (lhw !! 0) $ lhw !! 1