'use strict';
(function(stdin) {
	var lines  = stdin.toString().split('\n');
	var result = (function(data) {
		return data.filter(isValidData)
		.map(function(v) {
			var result = [];
			for (var i =0; i < v[0]; i++)
				result.push(line(v[1]));
			result.push('');
			return result.join('\n');

			function line(num){
				var result = '';
				for (var i = 0; i < num; i++)
					result += '#';
				return result;
			}
		}).join('\n')
	}(lines.map(function(v){return v.split(' ').map(Number);})
	));
	console.log(result);

	function isValidData(line){
		return line.every(function(v) {
			return v != 0;
		});
	}

}(require('fs').readFileSync('/dev/stdin', 'utf8')));