


def        lowerCAmelCase_  (      __lowerCamelCase			):
							return credit_card_number.startswith(("34", "35", "37", "4", "5", "6")			)







def        lowerCAmelCase_  (      __lowerCamelCase			):
							__snake_case	:    Optional[int]											=     credit_card_number
							__snake_case	:    Optional[int]											=     0
							__snake_case	:    Optional[Any]											=     len(__lowerCamelCase			) - 2
							for i in range(__lowerCamelCase							,			-1							,			-2			):
														#  double the value of every second digit
														__snake_case	:    List[str]											=     int(cc_number[i]			)
														digit *= 2
														# If doubling of a number results in a two digit number
														# i.e greater than 9(e.g., 6 × 2 = 12),
														# then add the digits of the product (e.g., 12: 1 + 2 = 3, 15: 1 + 5 = 6),
														# to get a single digit number.
														if digit > 9:
																					digit %= 1_0
																					digit += 1
														__snake_case	:    Tuple											=     cc_number[:i] + str(__lowerCamelCase			) + cc_number[i + 1 :]
														total += digit

							# Sum up the remaining digits
							for i in range(len(__lowerCamelCase			) - 1							,			-1							,			-2			):
														total += int(cc_number[i]			)

							return total % 1_0 == 0







def        lowerCAmelCase_  (      __lowerCamelCase			):
							__snake_case	:    List[str]											=     F'{credit_card_number} is an invalid credit card number because'
							if not credit_card_number.isdigit():
														print(F'{error_message} it has nonnumerical characters.'			)
														return False

							if not 1_3 <= len(__lowerCamelCase			) <= 1_6:
														print(F'{error_message} of its length.'			)
														return False

							if not validate_initial_digits(__lowerCamelCase			):
														print(F'{error_message} of its first two digits.'			)
														return False

							if not luhn_validation(__lowerCamelCase			):
														print(F'{error_message} it fails the Luhn check.'			)
														return False

							print(F'{credit_card_number} is a valid credit card number.'			)
							return True


if __name__ == "__main__":
			import doctest

			doctest.testmod()
			validate_credit_card_number("4111111111111111")
			validate_credit_card_number("32323")





from __future__ import annotations

_snake_case  :	Union[str, Any]			      =       {
    "A": ["B", "C", "E"],
    "B": ["A", "D", "E"],
    "C": ["A", "F", "G"],
    "D": ["B"],
    "E": ["A", "B", "D"],
    "F": ["C"],
    "G": ["C"],
}

class        a	:




							"""simple docstring"""


							def __init__(							self :						Tuple					,			lowerCamelCase :						dict[str, list[str]]					,			lowerCamelCase :						str       )			->					None:
														__snake_case	:    Tuple											=     graph
														# mapping node to its parent in resulting breadth first tree
														__snake_case	:    dict[str, str | None]											=     {}
														__snake_case	:    Dict											=     source_vertex

							def 					__snake_case      (							self :						Optional[int]       )			->					None:
														__snake_case	:    Dict											=     {self.source_vertex}
														__snake_case	:    List[str]											=     None
														__snake_case	:    Optional[Any]											=     [self.source_vertex]  # first in first out queue

														while queue:
																					__snake_case	:    List[Any]											=     queue.pop(0       )
																					for adjacent_vertex in self.graph[vertex]:
																												if adjacent_vertex not in visited:
																																			visited.add(lowerCamelCase       )
																																			__snake_case	:    Any											=     vertex
																																			queue.append(lowerCamelCase       )






							def 					__snake_case      (							self :						Optional[Any]					,			lowerCamelCase :						str       )			->					str:
														if target_vertex == self.source_vertex:
																					return self.source_vertex

														__snake_case	:    Optional[Any]											=     self.parent.get(lowerCamelCase       )
														if target_vertex_parent is None:
																					__snake_case	:    Optional[Any]											=     (
																					    F'No path from vertex: {self.source_vertex} to vertex: {target_vertex}'
																					)
																					raise ValueError(lowerCamelCase       )

														return self.shortest_path(lowerCamelCase       ) + F'->{target_vertex}'


if __name__ == "__main__":
			_snake_case  :	Optional[Any]			      =       Graph(graph, "G")
			g.breath_first_search()
			print(g.shortest_path("D"))
			print(g.shortest_path("G"))
			print(g.shortest_path("Foo"))

