





'''simple docstring'''




def 	_lowerCAmelCase      (  __snake_case  :			int      )					->					bool:

     if p < 2:
          raise ValueError('p should not be less than 2!'      )
     elif p == 2:
          return True

     __A						:			List[str]								=	4
     __A						:			Dict								=	(1 << p) - 1
     for _ in range(p - 2      ):
          __A						:			str								=	((s * s) - 2) % m
     return s == 0


if __name__ == "__main__":
  print(lucas_lehmer_test(7))
  print(lucas_lehmer_test(11))






'''simple docstring'''




def 	_lowerCAmelCase      (  __snake_case  :			str      )					->					str:
     __A						:			Optional[Any]								=	[0] * len(__snake_case      )
     __A						:			Dict								=	[]
     __A						:			Optional[int]								=	[1] * len(__snake_case      )

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

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

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

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

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

     print(max(__snake_case      )      )


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







longest_distance(graph)