Writing Molecular Formulas From Structures