Still - Time Limit Exceeded

Python version is a direct translation from the C++ version. The latter
passed the online judge.