


from collections import deque





def   _lowerCAmelCase				(   UpperCamelCase__:     List[str]						) ->   List[Any]:





	"""simple docstring"""







	A								=				len(UpperCamelCase__						)
	A								=				deque()
	A								=				[False for _ in range(UpperCamelCase__						)]
	A								=				[-1 for _ in range(UpperCamelCase__						)]
	A								=				index_of[:]

	def strong_connect(UpperCamelCase__:     Tuple							,					UpperCamelCase__:     Any							,					UpperCamelCase__:     Dict						):
		A								=				index  # the number when this node is seen
		A								=				index  # lowest rank node reachable from here
		index += 1
		stack.append(UpperCamelCase__						)
		A								=				True

		for w in g[v]:
			if index_of[w] == -1:
				A								=				strong_connect(UpperCamelCase__							,					UpperCamelCase__							,					UpperCamelCase__						)
				A								=				(
				    lowlink_of[w] if lowlink_of[w] < lowlink_of[v] else lowlink_of[v]
				)
			elif on_stack[w]:
				A								=				(
				    lowlink_of[w] if lowlink_of[w] < lowlink_of[v] else lowlink_of[v]
				)

		if lowlink_of[v] == index_of[v]:
			A								=				[]
			A								=				stack.pop()
			A								=				False
			component.append(UpperCamelCase__						)
			while w != v:
				A								=				stack.pop()
				A								=				False
				component.append(UpperCamelCase__						)
			components.append(UpperCamelCase__						)
		return index

	A								=				[]
	for v in range(UpperCamelCase__						):
		if index_of[v] == -1:
			strong_connect(UpperCamelCase__							,					0							,					UpperCamelCase__						)

	return components





def   _lowerCAmelCase				(   UpperCamelCase__:     int							,					UpperCamelCase__:     Dict						) ->   Dict:





	"""simple docstring"""







	A								=				[[] for _ in range(UpperCamelCase__						)]
	for u, v in edges:
		g[u].append(UpperCamelCase__						)
	return g


if __name__ == "__main__":
				# Test
				_lowercase       :      Any	=	7
				_lowercase       :      List[Any]	=	[0, 0, 1, 2, 3, 3, 4, 4, 6]
				_lowercase       :      Tuple	=	[1, 3, 2, 0, 1, 4, 5, 6, 5]
				_lowercase       :      Optional[int]	=	[(u, v) for u, v in zip(source, target)]
				_lowercase       :      str	=	create_graph(n_vertices, edges)

				assert [[5], [6], [4], [3, 2, 1, 0]] == tarjan(g)



def   _lowerCAmelCase				(   UpperCamelCase__:     int						) ->   bool:





	"""simple docstring"""







	return str(UpperCamelCase__						) == str(UpperCamelCase__						)[::-1]





def   _lowerCAmelCase				(   UpperCamelCase__:     int						) ->   int:





	"""simple docstring"""







	return int(UpperCamelCase__						) + int(str(UpperCamelCase__						)[::-1]						)





def   _lowerCAmelCase				(   UpperCamelCase__:     int = 1_00_00						) ->   int:





	"""simple docstring"""







	A								=				[]
	for num in range(1							,					UpperCamelCase__						):
		A								=				0
		A								=				num
		while iterations < 50:
			A								=				sum_reverse(UpperCamelCase__						)
			iterations += 1
			if is_palindrome(UpperCamelCase__						):
				break
		else:
			lychrel_nums.append(UpperCamelCase__						)
	return len(UpperCamelCase__						)


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



