A code for www.pythonchallenge.com