solve problem 10790