import re


def __replace_all(repls: dict, input: str) -> str:
    """ Replaces from the string **input** all the occurrence of the
    keys element of the dictionary **repls** with their relative
    value.

    :param dict repls: dictionary containing the mapping
                  between the values to be changed and their
                  appropriate substitution;
    :param str input: original string.
    :return: *(str)*, string with the appropriate values replaced.
    """
    return re.sub('|'.join(re.escape(key) for key in repls.keys()),
                  lambda k: repls[k.group(0)], input)