import scala.io.StdIn.readLine

object Main {

  def main(args: Array[String]) = {
      var n = readLine.split(" ").map(_.toInt)
      while( n(0) != 0 || n(1) != 0) {
        (1 to n(0)).foreach(s=>println("#"*n(1)))
        println("")
        n = readLine.split(" ").map(_.toInt)
      }
  }
}