Well, plants go through a phase Called photosynthesis. They take in sunlight, carbon dioxide (our exhale), and water to make sugar. Sugar is their supply of food, and the waste they make. It's oxygen (what we inhale)
During a dehydration reaction, two monomer molecules are covalently bonded to each other, with the loss of a water molecule. In this reaction, each monomer contributes part of the water molecule that is released during the reaction. This reaction is repeated as monomers are added to the chain one by one, making a polymer.