Add solution for problem 016.