Problem 36

Python 2.7