Add solution for UVA problem 299 Train Swapping