Horses output

May i know the how the output should look for multiple test cases, beacause everytime am getting wrong answer

You can not discuss strategy, suggestions or tips in the comments during a live contest. This may lead to disqualification.

//