Which test case is my code failing?

question link : https://www.codechef.com/COOK122B/problems/BOWLERS
my solution : https://www.codechef.com/viewsolution/38049739

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