
object Main {
  def main(args: Array[String]): Unit = {
    for(line <- io.Source.stdin.getLines() if line != "0 0") {
      val H = line.split(" ")(0).toInt
      val W = line.split(" ")(1).toInt

      for (i <- 0 until H) {
        println("#" * W)
      }
      println()
    }
  }
}