Assign UUIDs to elements