Working version of Problem 15; tragically slow and ineffective
Problem 15