import scala.io.StdIn

object Main extends App {

  var hw = StdIn.readLine().split(' ').map(_.toInt)
  while(hw(0) != 0 && hw(1) != 0){
    (0 until hw(0)).foreach{ _ =>
      (0 until hw(1)).foreach( _ => print("#"))
      println("")
    }
    println("")
    hw = StdIn.readLine().split(' ').map(_.toInt)
  }

}

