






'''simple docstring'''







_A	:			Any         ={'''a''': ['''c''', '''b'''], '''b''': ['''d''', '''e'''], '''c''': [], '''d''': [], '''e''': []}
_A	:			Optional[Any]         =['''a''', '''b''', '''c''', '''d''', '''e''']





def  SCREAMING_SNAKE_CASE_       (UpperCamelCase				,			UpperCamelCase				,			UpperCamelCase      )      ->       Union[str, Any]:
							lowerCamelCase__					:	str         =       start
							# add current to visited
							visited.append(UpperCamelCase      )
							lowerCamelCase__					:	Optional[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__					:	Union[str, Any]         =       topological_sort(UpperCamelCase				,			UpperCamelCase				,			UpperCamelCase      )
    # return sort
							return sort


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









lowerCamelCase	:							List[Any]				=[
    (1000, '''M'''),
    (900, '''CM'''),
    (500, '''D'''),
    (400, '''CD'''),
    (100, '''C'''),
    (90, '''XC'''),
    (50, '''L'''),
    (40, '''XL'''),
    (10, '''X'''),
    (9, '''IX'''),
    (5, '''V'''),
    (4, '''IV'''),
    (1, '''I'''),
]







def 		SCREAMING_SNAKE_CASE							(					__lowerCAmelCase			) ->	int:
     UpperCamelCase__			:   Optional[int]       				=  {"I": 1, "V": 5, "X": 10, "L": 50, "C": 100, "D": 500, "M": 1000}
     UpperCamelCase__			:   Any       				=  0
     UpperCamelCase__			:   Any       				=  0
     while place < len(__lowerCAmelCase			):
          if (place + 1 < len(__lowerCAmelCase			)) and (vals[roman[place]] < vals[roman[place + 1]]):
               total += vals[roman[place + 1]] - vals[roman[place]]
               place += 2
          else:
               total += vals[roman[place]]
               place += 1
     return total







def 		SCREAMING_SNAKE_CASE							(					__lowerCAmelCase			) ->	str:
     UpperCamelCase__			:   Optional[int]       				=  []
     for arabic, roman in ROMAN:
          ((UpperCamelCase__)				,     (UpperCamelCase__))			:   Optional[int]       				=  divmod(__lowerCAmelCase					,    __lowerCAmelCase			)
          result.append(roman * factor			)
          if number == 0:
               break
     return "".join(__lowerCAmelCase			)


if __name__ == "__main__":
 import doctest

 doctest.testmod()