Solve problem 77