Solved problem 25 with help of a little guessing.