while num = gets.split(" ").map(&:to_i) do
  if num[0] == 0 && num[1] == 0 then
    exit
  end
  for i in 1..num[0] do
    for j in 1..num[1] do
      printf("#")
    end
    printf("\n")
  end
  printf("\n")
end