



"""simple docstring"""
def       _snake_case						(						UpperCamelCase						:		int						):
 UpperCAmelCase	:					Union[str, Any]	=	[0] * len(UpperCamelCase						)
 UpperCAmelCase	:					List[Any]	=	[]
 UpperCAmelCase	:					Optional[int]	=	[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:
  UpperCAmelCase	:					Optional[Any]	=	queue.pop(0						)
  for x in graph[vertex]:
   indegree[x] -= 1

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

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

 print(max(UpperCamelCase						)						)


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

longest_distance(graph)




"""simple docstring"""







from itertools import permutations


def      lowercase			(				A_       )->      bool:
  '''simple docstring'''







  if num[3] % 2 != 0:
    return False

  if (num[2] + num[3] + num[4]) % 3 != 0:
    return False

  if num[5] % 5 != 0:
    return False

  a						:		Optional[int]      							=			[7, 11, 13, 17]
  for i, test in enumerate(A_       ):
    if (num[i + 4] * 100 + num[i + 5] * 10 + num[i + 6]) % test != 0:
      return False
  return True


def      lowercase			(				A_ = 10       )->      int:
  '''simple docstring'''







  return sum(
      int("".join(map(A_  ,   A_       )       )       )
      for num in permutations(range(A_       )       )
      if is_substring_divisible(A_       )       )


if __name__ == "__main__":
 print(f'''{solution() = }''')






