Getting Runtime Error(NZEC) in Python

My code is here:

http://www.codechef.com/viewsolution/4906868

Whenever I submit my code it gives me this error:

Runtime Error(NZEC)

How can I fix this?

//