Solve problem 012