A Complex Graph Problem | CodeChef