Solves problem 19