There's a definite mistake here:
<picture m_stim>
/ select = values.itemnumber
/ select = noreplace/ items = m_pics
/ size = (50%, 50%)
/ position = (50, 50)
</picture>
You also need two separate <list> elements -- one for the 'f' stims, one for the 'm' stims. The single existing one makes no sense in the context of the script
<list itemlist>
/ resetinterval = 0
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
...
421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440)
/ selectionmode = random
</list>
given that there are no item numbers up to 440.
<picture f_stim> has 220 items (item numbers thus ranging from 1 to 220), <picture m_stim> has 220 (again, item numbers ranging from 1 to 220).