Python Code For Depth First Search