object Main extends App {
  for (line <- scala.io.Source.stdin.getLines() if line.size > 0 && line != "0 0") {
    var cnt = 1
    if (cnt != 1) println()
    for (h <- 1 to line.split(" ")(0).toInt) {
      val horizon: String = """???""" * line.split(" ")(1).toInt
      println(horizon)
    }
    cnt += 1
  }
}