From where do the plants get carbon, oxygen and hydrogen?

Plants get carbon and oxygen from air, some amount of oxygen and hydrogen is received by the plant from the water.
The diagram is given below:


7