import scala.io.Source

object Main extends App{
  Source.stdin.getLines.toList.map(_.split(" ").map(_.toInt).toList).takeWhile({case List(a, b) => (a + b != 0)})
  .map(x => {for(i <- 1 to x(0)) yield "#"*x(1)}.mkString("\n"))
  .map(_ + "\n")
  .map(println)
}