Assign ids to spies.