from __future__ import annotations

from typing import Any, Optional

class UnionFind:
    def __init__(self, elementes: Optional[Any] = ...) -> None: ...
    def find(self, x: Any): ...
    def union(self, x: Any, y: Any) -> None: ...
    def is_connected(self, x: Any, y: Any): ...
