Help me in solving INCDECS problem

My issue

i cant get the output

My code



Learning course: Python with Data structures
Problem Link: Increasing-Decreasing Sequence Practice Problem in Python with Data structures - CodeChef