#include <iostream>
using namespace std;

int main(){

int W,H;

cin>> W >> H;

while(W&&H){
for(int i=1;i<=W;i++){
    for(int j=1;j<=H;j++){
cout<<"#";
}
cout<<endl;
}
cout<<endl;
cin >> W>> H;
}
return 0;
}
