Dfs Algorithm And Prolog Code