Topological band formation in magnetic chains on superconductors