Weird Paths in a tree | CodeChef