There is a problem presenting facial stimuli on the screen

Hello, I’m trying to make an experiment to find out the average trustworthiness perception of the group by using the ‘Builder’.

16 people’s faces were morphed into trustworthiness and untrustworthiness faces and stored in folders called ‘high’ and ‘low’ respectively.

After that, a total of 16 random pictures from ‘high’ and ‘low’ will be taken and presented on the screen. The photos presented at this time will be presented in various proportions from 16:0 to 0:16.

But here’s the problem. Just as the high and low trustworthiness faces of a person named ‘001’ are not presented together in certain trials, I want to make all 16 faces appear in each trial, and the high and low trustworthiness faces of a particular person are not shown together.

How do I avoid duplicating the same face as ‘fi_001_ltw’ in the ‘low’ folder when ‘fi_001_htw’ in the ‘high’ folder is selected in the process of picking 16 photos from a total of 32 photos in two folders?

In ‘high’ folder: ‘fi_001_htw’, ‘fi_002_htw’,… , ‘fi_016_htw’
In ‘low’ folder: ‘fi_001_ltw’, ‘fi_002_ltw’,… , ‘fi_016_ltw’

The image below is the code I made.

I would shuffle the identities of the photos, add the trustworthy stem for the first X and the untrustworthy stem for the remaining 16-X