WA in NOTALLFL

problem link: NOTALLFL Problem - CodeChef
Can anyone tell me what’s wrong with my code
my code in python:
CodeChef: Practical coding for everyone

It would be highly appreciated if someone points out the error in my code.