While going through some accepted solutions of the problem CNTFAIL which was asked in the Amritapuri ICPC Regionals. I found this particular solution to generate the following output for this particular case -
1 3 2 1
Expected Output -
I think this is a valid test case as per the given constraints because no where in the problem statement it is mentioned that only 2 different values will be mentioned in fact we need to check for inconsistency. I would be pleased if anyone can verify this test case, also if this test case is right that means the test data for the problem was weak.