#encoding:utf-8
rectangle = []
while true
 length_width = gets.split
 if length_width == ["0","0"]
  break
 end
 rectangle.push length_width
end

i = 0 #rectangleの要素のインデックス

while i < rectangle.length
 j = 0 #縦の繰り返し回数をカウント
 while j < rectangle[i][0].to_i
  puts "#"*rectangle[i][1].to_i
  j += 1
 end
 puts
 i += 1
end