import re


def pretty_element(s):
    """
    Returns formatted element name.

    Parameters
    ----------
    s : str
        of format [A-Z][a-z]?[0-9]+

    Returns
    -------
    str
        LaTeX formatted string with superscript numbers.
    """
    els = re.findall('([A-Za-z]{1,3})', s)
    ms = re.findall('([0-9]{1,3})', s)

    pretty = ['^{' + f'{m}' + '}' + f'{el}' for el, m in zip(els, ms)]
    return "$" + "/".join(pretty) + "$"