can any one help??i m getting wrong answer for snake snaky

here is the link CodeChef: Practical coding for everyone. Please let me know where is my mistake

In online platforms,there is no need to print “Enter the test cases” ,“Enter value of n m x y l” etc.

Just take input and print the output.