Problem in randomization

Hello everyone,
I made a matching task that had one target stimuli and 4 different responses. I have a problem with randomization. The gender of stimuli and responses should be identical. I made an excel file named face. I wrote male and female image names in that but this way psychopy just randomizes target stimuli without considering the gender of 4 responses. In addition, for each response, I only could choose the file on my laptop. I want the image gender of the target stimulus to be the same as the response stimuli in each trial. Is there any code that I should use?
Thank you

Hello,

you mind to provide a screen shot of your Excel-file? PsychoPy randomizes rows.

Best wishes Jens