Which test case is my code failing?

question link : CodeChef: Practical coding for everyone
my solution : CodeChef: Practical coding for everyone

Take this
1
15 3 5
Your output : 1 2 1 2 1 2 1 2 1 2 3 4 3 4 3
There are only 3 player, your code use 4 player.
One correct output can be: 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3

Hope this helps.

Thanks, @ashwat_b