Solving Problem 30