The classification of sunspot groups