




"""simple docstring"""






def   _snake_case    (       lowercase__	):
    _lowerCamelCase  :    Dict					=					[0] * len(lowercase__	)
    _lowerCamelCase  :    int					=					[]
    _lowerCamelCase  :    Dict					=					[1] * len(lowercase__	)

    for values in graph.values():
        for i in values:
            indegree[i] += 1

    for i in range(len(lowercase__	)	):
        if indegree[i] == 0:
            queue.append(lowercase__	)

    while queue:
        _lowerCamelCase  :    Optional[int]					=					queue.pop(0	)
        for x in graph[vertex]:
            indegree[x] -= 1

            if long_dist[vertex] + 1 > long_dist[x]:
                _lowerCamelCase  :    Optional[int]					=					long_dist[vertex] + 1

            if indegree[x] == 0:
                queue.append(lowercase__	)

    print(max(lowercase__	)	)


# Adjacency list of Graph
lowercase__  		=		{0: [2, 3, 4], 1: [2, 7], 2: [5], 3: [5, 7], 4: [7], 5: [6], 6: [7], 7: []}
longest_distance(graph)





"""simple docstring"""






def   _snake_case    (       lowercase__	):
				_lowerCamelCase  :    List[str]					=					abs(lowercase__	)
				_lowerCamelCase  :    Optional[int]					=					0
				while n > 0:
								res += n % 10
								n //= 10
				return res







def   _snake_case    (       lowercase__	):
				_lowerCamelCase  :    List[str]					=					abs(lowercase__	)
				return n if n < 10 else n % 10 + sum_of_digits(n // 10	)







def   _snake_case    (       lowercase__	):
				return sum(int(lowercase__	) for c in str(abs(lowercase__	)	)	)







def   _snake_case    (       ):
				from collections.abc import Callable
				from timeit import timeit

				def benchmark_a_function(lowercase__							,					lowercase__	) -> None:
								_lowerCamelCase  :    int					=					f'''{func.__name__}({value})'''
								_lowerCamelCase  :    Optional[Any]					=					timeit(f'''__main__.{call}'''							,					setup='import __main__'	)
								print(f'''{call:56} = {func(lowercase__	)} -- {timing:.4f} seconds'''	)

				for value in (262144, 1125899906842624, 1267650600228229401496703205376):
								for func in (sum_of_digits, sum_of_digits_recursion, sum_of_digits_compact):
												benchmark_a_function(lowercase__							,					lowercase__	)
								print()


if __name__ == "__main__":
			import doctest

			doctest.testmod()
			benchmark()