I have n number of queues (depends on the no. of threads ) and what i need is that, i want loop each of queue starting from from the 2nd queue to the nth (end) queue.

how can i loop this?
...