import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)

    while (true) {
        val h = sc.nextInt()
        val w = sc.nextInt()
        if (h == 0 && w == 0) break
        println("${"#".repeat(w)}\n".repeat(h))
    }
}

