def reverse_mapping(mapping):
    """
    Construct a reverse dictionary mapping values to keys.

    :param dict mapping: the original dictionary.
    """
    reverse = {}
    for key, values in mapping.items():
        for value in values:
            reverse[value] = key
    return reverse