Representation and Synthesis of Molecular Graphs