/**
  * Created by ui on 2016/02/04.
  */
object Main {
  

  def inputScanner = {
    val sc = new java.util.Scanner(System.in)
    val n, m = sc.nextInt
    (n, m)
  }

  def printRectangle(a: (Int, Int)) {
    val s = "".padTo(a._1, '#')
    for (i <- 0 until a._2) println(s)
  }

  def run() {
    var a = inputScanner
    while (a !=(0, 0)) {
      printRectangle(a)
      a = inputScanner
    }
  }
  def main(args: Array[String]) {
    run()
  }
}