How are protein, nucleic acids, and carbohydrates formed in living organisms?