'''simple docstring'''




class 	__UpperCAmelCase				:





       '''simple docstring'''



       def __init__(      self    ,     _SCREAMING_SNAKE_CASE )		->     Any:
           A_     =   data
           A_     =   42
           A_     =   42





def      _UpperCAmelCase    (							_UpperCamelCase    :	Dict   )	->      Dict:
    A_     =   0
    A_     =   x





def      _UpperCAmelCase    (							_UpperCamelCase    :	Optional[int],   _UpperCamelCase    :	Optional[Any]   )	->      List[Any]:
    A_     =   find_set(_lowerCamelCase   ), find_set(_lowerCamelCase   )
    if x == y:
        return

    elif x.rank > y.rank:
        A_     =   x
    else:
        A_     =   y
        if x.rank == y.rank:
            y.rank += 1





def      _UpperCAmelCase    (							_UpperCamelCase    :	Union[str, Any]   )	->      str:
    if x != x.parent:
        A_     =   find_set(x.parent   )
    return x.parent





def      _UpperCAmelCase    (							_UpperCamelCase    :	Optional[int]   )	->      Any:
    A_     =   ({0, 1, 2}, {3, 4, 5})
    for s in sets:
        if node.data in s:
            return s
    A_     =   F'''{node.data} is not in {sets}'''
    raise ValueError(_lowerCamelCase   )





def      _UpperCAmelCase    (							)	->      Optional[Any]:
    A_     =   [Node(_lowerCamelCase   ) for i in range(6   )]
    for v in vertex:
        make_set(_lowerCamelCase   )

    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(_lowerCamelCase   ).isdisjoint(find_python_set(_lowerCamelCase   )   ):
                assert find_set(_lowerCamelCase   ) != find_set(_lowerCamelCase   )
            else:
                assert find_set(_lowerCamelCase   ) == find_set(_lowerCamelCase   )


if __name__ == "__main__":
  test_disjoint_set()














"""simple docstring"""
def        lowerCamelCase_  (						_lowerCamelCase				):
 return 1 if input_a == 0 else 0






def        lowerCamelCase_  (						):
 assert not_gate(0				) == 1
 assert not_gate(1				) == 0


if __name__ == "__main__":
      print(not_gate(0))
      print(not_gate(1))

