import java.util.Scanner

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

    while(true){
	val h = cin.nextInt()
	val w = cin.nextInt()

	if(h == 0 && w == 0){
	    break
	}else{
            for(i in 1..h){
	        for(j in 1..w){
	            print("#")
	        }
            print("%n".format())
            }
	    print("%n".format())
	}
    }
}

