The chromatic index of a graph whose core has maximum degree 2