Sorting, feeding, assembling, riveting, or finishing parts of chains