Solution of problem 1112