





"""simple docstring"""
def 					__lowerCamelCase       (							a_					:		Dict							)      ->				List[str]:
      __SCREAMING_SNAKE_CASE       :List[Any]		    =  [0] * len(a_							)
      __SCREAMING_SNAKE_CASE       :Tuple		    =  []
      __SCREAMING_SNAKE_CASE       :List[str]		    =  [1] * len(a_							)

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

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

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

                  if long_dist[vertex] + 1 > long_dist[x]:
                        __SCREAMING_SNAKE_CASE       :List[str]		    =  long_dist[vertex] + 1

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

      print(max(a_							)							)


# Adjacency list of Graph
lowerCamelCase_       =		{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 					__lowerCamelCase       (							a_					:		int			,       a_					:		int							)      ->				int:
      return int((input_a, input_a).count(0							) == 0							)



def 					__lowerCamelCase       (							)      ->				None:
      assert and_gate(0			,       0							) == 0
      assert and_gate(0			,       1							) == 0
      assert and_gate(1			,       0							) == 0
      assert and_gate(1			,       1							) == 1


if __name__ == "__main__":
  test_and_gate()
  print(and_gate(1, 0))
  print(and_gate(0, 0))
  print(and_gate(0, 1))
  print(and_gate(1, 1))