Bfs And Dfs Implementation In Python