import random
import string


def generate_uid() -> str:
    """
    Create DHIS2 UID matching to Regex
    ^[A-Za-z][A-Za-z0-9]{10}$
    :return: UID string
    """
    # first must be a letter
    first = random.choice(string.ascii_letters)
    # rest must be letters or numbers
    rest = "".join(
        random.choice(string.ascii_letters + string.digits) for _ in range(10)
    )
    return first + rest