


__UpperCamelCase    :						Union[str, Any]     =							{'a': ['c', 'b'], 'b': ['d', 'e'], 'c': [], 'd': [], 'e': []}
__UpperCamelCase    :						str     =							['a', 'b', 'c', 'd', 'e']





def   _UpperCAmelCase       (     UpperCAmelCase      :			int						,	UpperCAmelCase      :			Optional[int]						,	UpperCAmelCase      :			Optional[Any]      ):
      """simple docstring"""




      __lowerCamelCase     :      Union[str, Any]       						=						start
      # add current to visited
      visited.append(UpperCAmelCase      )
      __lowerCamelCase     :      Any       						=						edges[current]
      for neighbor in neighbors:
            # if neighbor not in visited, visit
            if neighbor not in visited:
                  __lowerCamelCase     :      str       						=						topological_sort(UpperCAmelCase						,	UpperCAmelCase						,	UpperCAmelCase      )
    # if all neighbors visited add current to sort
      sort.append(UpperCAmelCase      )
      # if all vertices haven't been visited select a new one to visit
      if len(UpperCAmelCase      ) != len(UpperCAmelCase      ):
            for vertice in vertices:
                  if vertice not in visited:
                        __lowerCamelCase     :      Optional[int]       						=						topological_sort(UpperCAmelCase						,	UpperCAmelCase						,	UpperCAmelCase      )
    # return sort
      return sort


if __name__ == "__main__":
    __UpperCamelCase    :						int     =							topological_sort('a', [], [])
    print(sort)







def   _UpperCAmelCase       (     UpperCAmelCase      :			list      ):
      """simple docstring"""




      __lowerCamelCase     :      Optional[int]       						=						len(UpperCAmelCase      )
      for _ in range(UpperCAmelCase      ):
            for i in range(_ % 2						,	arr_size - 1						,	2      ):
                  if arr[i + 1] < arr[i]:
                        __lowerCamelCase						, __lowerCamelCase     :      List[str]       						=						arr[i + 1], arr[i]

      return arr


if __name__ == "__main__":
    __UpperCamelCase    :						str     =							list(range(10, 0, -1))
    print(F'''Original: {arr}. Sorted: {odd_even_transposition(arr)}''')



