#include<bits/stdc++.h>
using namespace std;

int x[10003]={};

int main(){
	int a,b;
	while (1){
		cin>>a>>b;
		if (a==0 && b==0)return 0;
		for (int i=0;i<a;i++){
			for (int j=0;j<b;j++)cout<<"#";
			cout<<endl;
		}
		cout<<endl;
	}
	
}
