The classification of alternating links