"""simple docstring"""




import random







class __snake_case    :




   @staticmethod
   def      __a						(   _lowercase      :    str				):



     """simple docstring"""






     SCREAMING_SNAKE_CASE__      							=				[ord(__A				) for i in text]
     SCREAMING_SNAKE_CASE__      							=				[]
     SCREAMING_SNAKE_CASE__      							=				[]
     for i in plain:
       SCREAMING_SNAKE_CASE__      							=				random.randint(1	,     3_00				)
       SCREAMING_SNAKE_CASE__      							=				(i + k) * k
       cipher.append(__A				)
       key.append(__A				)
     return cipher, key




   @staticmethod
   def      __a						(   _lowercase      :    list[int]	,     _lowercase      :    list[int]				):



     """simple docstring"""






     SCREAMING_SNAKE_CASE__      							=				[]
     for i in range(len(__A				)				):
       SCREAMING_SNAKE_CASE__      							=				int((cipher[i] - (key[i]) ** 2) / key[i]				)
       plain.append(chr(__A				)				)
     return "".join(__A				)


if __name__ == "__main__":
   __lowerCamelCase      :			List[str]							       =		Onepad().encrypt('''Hello''')
   print(c, k)
   print(Onepad().decrypt(c, k))

def      __SCREAMING_SNAKE_CASE  ( __UpperCamelCase   :	List[Any]     )							-> Any:







  """simple docstring"""





  SCREAMING_SNAKE_CASE__      							=				[0] * len(__UpperCamelCase     )
  SCREAMING_SNAKE_CASE__      							=				[]
  SCREAMING_SNAKE_CASE__      							=				[1] * len(__UpperCamelCase     )

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

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

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

      if long_dist[vertex] + 1 > long_dist[x]:
        SCREAMING_SNAKE_CASE__      							=				long_dist[vertex] + 1

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

  print(max(__UpperCamelCase     )     )


# Adjacency list of Graph
__lowerCamelCase      :			int							       =		{0: [2, 3, 4], 1: [2, 7], 2: [5], 3: [5, 7], 4: [7], 5: [6], 6: [7], 7: []}






longest_distance(graph)
