According to the diagram shown on the right, how does energy flow in an ecosystem?

A.Energy flows from producers to the Sun and from producers to consumers.

B Energy flows directly from the Sun to both producers and consumers.

C Energy flows from consumers toward producers and the Sun.

D Energy flows from the Sun through producers to consumers.