How do I select any of the two selectors?

how to select any of the selectors."blue a.name " or. "red a.name "? If I write "a.name ", then it is also selected."green a.name "what I don't need.

The option as in the picture is not suitable, because it doubles the entries separately for "dog_sir" and separately for "dog_dam"

ex. page

Hi,

To exclude green, use the selector.item-wrapper:not(:has(.green)) a.name

That's what I needed, thanks bro