fun main(args: Array<String>) {
    while(true)
    {
        val list = readLine()!!.split(" ").map(String::toInt)
        if ((list[0]==0) or (list[1]==0))
        {
            return
        }
        for (j in 1..list[0])
        {
            for (i in 1..list[1])
            {
                print('#')
            }
            println("")
        }
        println("")
    }
}
