One test case not passing for Increasing Decreasing Sequence

I’ve done the question, the code passes all test cases except test case 0.

I begin with assuming that the series is decreasing to begin with and update it to increasing when it happens and print the output.

Code: