3 nested loops for counterbalancing task order

Hello,

Sorry to reopen this discussion but it seems that I have the same problem. I would like to counterbalancing order of 4 subtasks. I had already posted a message (Concatenate in nReps) but I think I am in a wrong direction. Your solution looks like easier but I don’t understand what TheSquence refers to in your coding. Could you enlighten me? or give me some supplementary advice?
I am a beginner with coding, I think I miss some basic rules to understand what you did.

Thank you if you can help.