Script to group relays by families

