My program gives the right sample output (at least the right parts of it that are given in the problem statement). It also works correctly on the input/output given by Adrian Kuegel.
I use recursive method and my function works depending on whether length of the string is odd or even, as was said in the Board.
But judges don't like my program. It gets WA.
Can anyone say if there is something special with the problem that wasn't said in the problem statement and in the Board?
I don't want to ask for the outputs for strings like 'abcdefgh' or 'abcdefghi' - 'cause it's like giving correct program... and also as the Board is not infinite to hold'em in.
But I think that output for 'abcd' can be given and I'll be very glad if someone would give it.