from typing import Any


def smallid(n: Any, seglen: int = 3, sep: str = "...") -> str:
    """Reduce a String into the first and last `seglen` characters, on either
        side of `sep`.

        smallid(1234567890, 3, "...") -> "123...890"
    """
    ns = str(n)
    return f"{ns[:seglen]}{sep}{ns[-seglen:]}"