Thank you for your answer eahuntley!
I think I was not clear when I explained my problem.
My experiment is composed of 4 lists of stimuli (A B C D). Each of these lists includes stimuli from 1 to 12. This way, I have A1, A2, A3 etc.
I already managed to randomize the order of my stimuli from my lists (from 1 to 12, by presenting each of them only once). I also found how to randomize my lists to have A1, C12, B4, D8, A9, D6, B3, C8 and so on.
My problem is that I do not want to have in a succession the same stimuli list presented : for exemple, presenting A8 and right after A9. So in sum, I managed to produce : A9, B8, C6, D4, D3, A8, C7, B7. And I do not want those D4 and D3 one after the other.
I’m so sorry I was not clear earlier !
Thank you for your help !