http://www.pythonchallenge.com problems solution