Solves problem 25