





from collections import defaultdict

from graphs.minimum_spanning_tree_prims import prisms_algorithm as mst



def 						A_							(	)		->					Optional[Any]:
 UpperCamelCase      ,       UpperCamelCase      :   List[Any]			      =  9, 14  # noqa: F841
 UpperCamelCase      :   Any			      =  [
     [0, 1, 4],
     [0, 7, 8],
     [1, 2, 8],
     [7, 8, 7],
     [7, 6, 1],
     [2, 8, 2],
     [8, 6, 6],
     [2, 3, 7],
     [2, 5, 4],
     [6, 5, 2],
     [3, 5, 14],
     [3, 4, 9],
     [5, 4, 10],
     [1, 7, 11],
 ]

 UpperCamelCase      :   Tuple			      =  defaultdict(_lowerCAmelCase	)
 for nodea, nodea, cost in edges:
  adjancency[nodea].append([nodea, cost]	)
  adjancency[nodea].append([nodea, cost]	)

 UpperCamelCase      :   Union[str, Any]			      =  mst(_lowerCAmelCase	)

 UpperCamelCase      :   Optional[Any]			      =  [
     [7, 6, 1],
     [2, 8, 2],
     [6, 5, 2],
     [0, 1, 4],
     [2, 5, 4],
     [2, 3, 7],
     [0, 7, 8],
     [3, 4, 9],
 ]

 for answer in expected:
  UpperCamelCase      :   List[Any]			      =  tuple(answer[:2]	)
  UpperCamelCase      :   Tuple			      =  tuple(edge[::-1]	)
  assert edge in result or reverse in result







def 						A_							(	_lowerCAmelCase	)		->					bool:
 return str(_lowerCAmelCase	) == str(_lowerCAmelCase	)[::-1]



def 						A_							(	_lowerCAmelCase	)		->					int:
 return int(_lowerCAmelCase	) + int(str(_lowerCAmelCase	)[::-1]	)



def 						A_							(	_lowerCAmelCase = 1_0000	)		->					int:
 UpperCamelCase      :   List[Any]			      =  []
 for num in range(1				,  _lowerCAmelCase	):
  UpperCamelCase      :   Union[str, Any]			      =  0
  UpperCamelCase      :   List[str]			      =  num
  while iterations < 50:
   UpperCamelCase      :   int			      =  sum_reverse(_lowerCAmelCase	)
   iterations += 1
   if is_palindrome(_lowerCAmelCase	):
    break
  else:
   lychrel_nums.append(_lowerCAmelCase	)
 return len(_lowerCAmelCase	)


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