def extract_path(x):
  """
  extract_path(x)

  Return the path from the circuit `x`. 

  Assumption: The start city is city 0.
  """
  n = len(x)
  start = 0 # we start at city 0 
  path = []
  for _i in range(n):
    start = x[start]
    path.append(start)
  return path