Writing formulas for Compounds