Solving problem 112