Add solution to problem 188