DFS solution to finding the Euler circuit