Simple pseudorandomisation of text stimuli

I have a simple experiemnt which displays text stimuli. The stimuli consist of 60 words, but each is presented 3 times (at different latencies), so with a random order, sometimes the same word comes up twice in a row.

Does anyone know of an easy way to pseudorandomise the order (e.g. prohibiting the current trial from having an identical stimuli to the last)? Thanks for any tips!

Best,

Jade

Have a look at my randomisation without repetition online demo