object Main extends App {
  scala.io.Source.stdin.getLines.toList.init
    .map(_.split(" ").map(_.toInt))
    .map(x => (x(0), x(1)))
    .map(x => List.fill(x._1)("#" * x._2).mkString("\n"))
    .map(x => println(x + "\n"))
}