






"""simple docstring"""





class 						_a  :





   '''simple docstring'''






   def __init__(       self					, UpperCAmelCase_)			->   int:




          '''simple docstring'''




          lowercase__:							List[str]         =     data
          lowercase__:							int
          lowercase__:							Node







def 							A(    snake_case_						):
       """simple docstring"""





       lowercase__:							Any         =     0
       lowercase__:							Optional[int]         =     x






def 							A(    snake_case_		,  snake_case_						):
       """simple docstring"""





       lowercase__:							str         =     find_set(__UpperCamelCase						), find_set(__UpperCamelCase						)
       if x == y:
              return

       elif x.rank > y.rank:
              lowercase__:							List[str]         =     x
       else:
              lowercase__:							List[str]         =     y
              if x.rank == y.rank:
                     y.rank += 1






def 							A(    snake_case_						):
       """simple docstring"""





       if x != x.parent:
              lowercase__:							int         =     find_set(x.parent						)
       return x.parent






def 							A(    snake_case_						):
       """simple docstring"""





       lowercase__:							Tuple         =     ({0, 1, 2}, {3, 4, 5})
       for s in sets:
              if node.data in s:
                     return s
       lowercase__:							Tuple         =     F"""{node.data} is not in {sets}"""
       raise ValueError(__UpperCamelCase						)






def 							A(    ):
       """simple docstring"""





       lowercase__:							Union[str, Any]         =     [Node(__UpperCamelCase						) for i in range(6						)]
       for v in vertex:
              make_set(__UpperCamelCase						)

       union_set(vertex[0]		,  vertex[1]						)
       union_set(vertex[1]		,  vertex[2]						)
       union_set(vertex[3]		,  vertex[4]						)
       union_set(vertex[3]		,  vertex[5]						)

       for nodea in vertex:
              for nodea in vertex:
                     if find_python_set(__UpperCamelCase						).isdisjoint(find_python_set(__UpperCamelCase						)						):
                            assert find_set(__UpperCamelCase						) != find_set(__UpperCamelCase						)
                     else:
                            assert find_set(__UpperCamelCase						) == find_set(__UpperCamelCase						)


if __name__ == "__main__":
  test_disjoint_set()








_SCREAMING_SNAKE_CASE     :   dict[str, float]							 =      {
    "kilogram": 1,
    "gram": pow(1_0, 3),
    "milligram": pow(1_0, 6),
    "metric-ton": pow(1_0, -3),
    "long-ton": 0.00_0984_2073,
    "short-ton": 0.00_1102_3122,
    "pound": 2.20_4624_4202,
    "stone": 0.15_7473_1728,
    "ounce": 35.2_7399_0723,
    "carrat": 5_0_0_0,
    "atomic-mass-unit": 6.022136652E26,
}

_SCREAMING_SNAKE_CASE     :   dict[str, float]							 =      {
    "kilogram": 1,
    "gram": pow(1_0, -3),
    "milligram": pow(1_0, -6),
    "metric-ton": pow(1_0, 3),
    "long-ton": 1016.0_4608,
    "short-ton": 907.184,
    "pound": 0.45_3592,
    "stone": 6.3_5029,
    "ounce": 0.028_3495,
    "carrat": 0.0002,
    "atomic-mass-unit": 1.660540199E-27,
}

def 					SCREAMING_SNAKE_CASE  (   __UpperCamelCase			:    str				,    __UpperCamelCase			:    str				,    __UpperCamelCase			:    float							)			->							float:

				"""simple docstring"""







				if to_type not in KILOGRAM_CHART or from_type not in WEIGHT_TYPE_CHART:
								A__	:						int								=				(
								    F"Invalid 'from_type' or 'to_type' value: {from_type!r}, {to_type!r}\n"
								    F"Supported values are: {', '.join(__UpperCamelCase							)}"
								)
								raise ValueError(__UpperCamelCase							)
				return value * KILOGRAM_CHART[to_type] * WEIGHT_TYPE_CHART[from_type]


if __name__ == "__main__":
					import doctest

					doctest.testmod()