Trying to solve prob 216