The first card is for men 1, and the third card can only be for women 1. At this time, there are two situations.
When the first card is given to the woman 1, the same is true in both cases.
The first card is given to male 2, and the third card can only be given to female 2. There are two situations at this time.
When the first card is given to female 2, both situations are the same.
So there are eight ways.