completed Eulerian Tour in python