ChatGPT - Bidirectional BFS Python