September Lunchtime

[4 3 2 1 6 5]
How this output isn’t correct for sample test case 1?
Question-CodeChef: Practical coding for everyone
Please write the reason

this is one of the correct outputs for this 1 3 4 6 1 3 4 6 1 , since 1 is opposite to 4 , 2 is opposite to 3 and 5 os opposite to 6.

all cases can have multiple answers , what you need to maintain is 1’s opp cannot be 3, 3’s opp cannt be 4 , 4’s opp cannot be 6 and so on till the end for this test case, and it cannot have s[i]==s[i+1]