H=0;W=0
while true do
  str=gets.chomp
  number=str.split
  H=number[0].to_i
  W=number[1].to_i
  if H==0 && W==0 then
    break
  end
  for i in 1..H do
    for j in 1..W do
      print "#"
    end
    print "\n"
  end
end