def    lowerCAmelCase_  (		lowercase:				Union[str, Any]		)     ->					List[Any]:







 '''simple docstring'''
 _UpperCamelCase:  Any    						=			[0] * len(_SCREAMING_SNAKE_CASE		)
 _UpperCamelCase:  List[Any]    						=			[]
 _UpperCamelCase:  str    						=			[1] * len(_SCREAMING_SNAKE_CASE		)

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

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

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

   if long_dist[vertex] + 1 > long_dist[x]:
    _UpperCamelCase:  Any    						=			long_dist[vertex] + 1

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

 print(max(_SCREAMING_SNAKE_CASE		)		)


# Adjacency list of Graph
UpperCAmelCase_           =				{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 					__A  (_SCREAMING_SNAKE_CASE	,  _SCREAMING_SNAKE_CASE     )   ->list[str]:





  """simple docstring"""


  return [sentence[i : i + ngram_size] for i in range(len(_SCREAMING_SNAKE_CASE     ) - ngram_size + 1     )]


if __name__ == "__main__":
  from doctest import testmod

  testmod()
