Bfs Python Code With User Input