def histogram(letters):
    """
    Creates a frequency histogram of the given letters
    Input: letters -- word or scrambled letters
    Output: dictionary mapping from letters to the # of occurences of that letter
    """
    d = dict()
    for letter in letters:
        if letter in d:
            d[letter] += 1
        else:
            d[letter] = 1
    return d