var input=require("fs").readFileSync("/dev/stdin","utf8");
let str,i=0,n,m,w;

input=input.split("\n");

while(1){
    str=input[i].split(" ");
    let H=parseFloat(str[0]);
    let W=parseFloat(str[1]);
    
    if(H==0&&W==0){
        break;
    }
    
    for(n=0;n<H;n++){
        w="";
        for(m=0;m<W;m++){
            w+="#";
        }
        console.log(w);
    }
    console.log("\n");
    i++
}
