"use strict"
const input = require('fs').readFileSync('/dev/stdin','utf8');
const arr = input.split('\n')
for (let i in arr) {
	const list = arr[i].split(' ');
	const w = parseInt(list[0]);
	const h = parseInt(list[1]);
	if (w === 0 && h === 0) break;
	printRect(w, h);
	console.log('');
}

function printRect(w, h) {
	let line = '';
	const c = '#';
	for (let i = 0; i < w; i++) {
		for (let j = 0 ;j < h; j++) {
			line += c;
		}
		console.log(line);
		line = '';
	} 
}

