
'''simple docstring'''






def    UpperCAmelCase							(  UpperCAmelCase__							:							int):
				assert isinstance(UpperCAmelCase__       ,							UpperCAmelCase__), F'''The input value of [n={number}] is not an integer'''

				if number == 1:
								return 2
				elif number < 1:
								lowerCamelCase					:			str									= F'''The input value of [n={number}] has to be > 0'''
								raise ValueError(UpperCAmelCase__)
				else:
								lowerCamelCase					:			int									= sylvester(number - 1)
								lowerCamelCase					:			Any									= num - 1
								lowerCamelCase					:			List[str]									= num
								return lower * upper + 1


if __name__ == "__main__":
					print(f"""The 8th number in Sylvester's sequence: {sylvester(8)}""")


'''simple docstring'''






A			      =      {'a': ['c', 'b'], 'b': ['d', 'e'], 'c': [], 'd': [], 'e': []}
A			      =      ['a', 'b', 'c', 'd', 'e']





def    UpperCAmelCase							(  UpperCAmelCase__							:							Union[str, Any]       ,							UpperCAmelCase__							:							Any       ,							UpperCAmelCase__							:							List[Any]):
				lowerCamelCase					:			List[Any]									= start
				# add current to visited
				visited.append(UpperCAmelCase__)
				lowerCamelCase					:			List[str]									= edges[current]
				for neighbor in neighbors:
								# if neighbor not in visited, visit
								if neighbor not in visited:
												lowerCamelCase					:			Any									= 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					:			List[str]									= topological_sort(UpperCAmelCase__       ,							UpperCAmelCase__       ,							UpperCAmelCase__)
    # return sort
				return sort


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