The classification and enumeration of multiply connected graphs