number = gets.split(" ").map(&:to_i)
H = number[0]
W = number[1]
unless (H == 0 && W == 0)
  H.times do
    W.downto(1) do |num|
      if num != 1
        printf "#"
      else
        printf "#\n"
      end
    end 
  end
end