First problem solved in Python.