import java.util.*

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

	while (true) {
		val H = cin.nextInt()
		val W = cin.nextInt()
		if (H + W == 0) break

		for (h in 0 until H) {
			ans.add("#".repeat(W))
		}
		ans.add("")
	}
	println(ans.joinToString("\n"))
}

