Solved UVa 10242