Solve UVa 10099 - The Tourist Guide.