Solves Problem 19 in Python