Add IDs to edge groups.