Add solution for UVa 12376