import typing as tp

class IterValue:
    def __init__(self) -> None: ...

    def __iter__(self) -> 'IterValue': ...

    def __next__(self) -> int: ...

class IterInterval:
    def __init__(self) -> None: ...

    def __iter__(self) -> 'IterInterval': ...

    def __next__(self) -> int: ...

class IterState:
    def __init__(self) -> None: ...

    def __iter__(self) -> 'IterState': ...

    def __next__(self) -> bool: ...


class Sieve:
    def __init__(self, expr: str, /) -> None: ...

    def __repr__(self) -> str: ...

    def __contains__(self, v: int, /) -> bool: ...

    def __invert__(self) -> 'Sieve': ...

    def __xor__(self, other: 'Sieve') -> 'Sieve': ...

    def __or__(self, other: 'Sieve') -> 'Sieve': ...

    def __and__(self, other: 'Sieve') -> 'Sieve': ...

    def iter_value(self, start: int, stop: int, /) -> IterValue: ...

    def iter_interval(self, start: int, stop: int, /) -> IterInterval: ...

    def iter_state(self, start: int, stop: int, /) -> IterState: ...
