I was trying to solve SAMESNAK problem on codechef and came up with this solution. I have already looked at all the other questions on the forum and my code passes all the test cases which other have pointed out.
Can someone tell me where my code fails ??