Solve problem 29 in one line in IPython.