challenges - topcoder - Finish problem 12545 in Python.