Rewrite the solution to 1-16.