object Main {
  def main(args:Array[String]): Unit = {
    val xs = readLine().split(" ").map(s => s.toInt)
    val h = xs(0) 
    val w = xs(1)
    val res = printRepeat(1 to h)(printRepeat(1 to w)("#") + "\n")
    println(res)
  }
  
  def printRepeat(r:Range)(s:String): String = {
    r.foldLeft("")((a, _) => a + s )
  }
}