Pseudorandomize sentences

What are you trying to achieve?: I want to present sentences in a paced reading experiment. Each sentence has 20 windows, and there’s 60 sentences per condition, also divided by sets of 2. So, sentence 1 and 2 are part of the set 1, but they are both different conditions. I have a csv file with columns inidcating the condition and the set. I want to pseudorandomize the presentation order for each participant such that no sentence from the same condition and no sentence from the same set appear consecutively.