


"""simple docstring"""







lowerCAmelCase__				    =       {'''a''': ['''c''', '''b'''], '''b''': ['''d''', '''e'''], '''c''': [], '''d''': [], '''e''': []}
lowerCAmelCase__				    =       ['''a''', '''b''', '''c''', '''d''', '''e''']
def  a__      (    SCREAMING_SNAKE_CASE   :   int    ,				SCREAMING_SNAKE_CASE   :   List[Any]    ,				SCREAMING_SNAKE_CASE   :   Any    ):


  '''simple docstring'''







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


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









"""simple docstring"""







import baseaa
def  a__      (    SCREAMING_SNAKE_CASE   :   str    ):


  '''simple docstring'''







  return baseaa.baaencode(string.encode("utf-8"    )    )
def  a__      (    SCREAMING_SNAKE_CASE   :   bytes    ):


  '''simple docstring'''







  return baseaa.baadecode(SCREAMING_SNAKE_CASE    ).decode("utf-8"    )


if __name__ == "__main__":
     lowerCAmelCase__				    =       '''Hello World!'''
     lowerCAmelCase__				    =       baseaa_encode(test)
     print(encoded)

     lowerCAmelCase__				    =       baseaa_decode(encoded)
     print(decoded)





