import string


def as_id(text: str) -> str:
    text = text.lower()
    return "".join(c if c in (string.ascii_lowercase + string.digits) else "-" for c in text)

import string


def as_id(text: str) -> str:
    text = text.lower()
    return "".join(c if c in (string.ascii_lowercase + string.digits) else "-" for c in text)
