Add solution to problem 12