We say a word is balanced if all its letters have the same number of occurrences. For example, the word Caucasus contains four pairs of letters and the word SCINTILLESCENT contains seven pairs of letters.

scintillescent
The word SCINTILLESCENT contains seven pairs of letters.

Assignment

Example

>>> occurrences('Caucasus')
{'a': 2, 'c': 2, 'u': 2, 's': 2}
>>> occurrences('teammate')
{'a': 2, 'm': 2, 'e': 2, 't': 2}
>>> occurrences('SCINTILLESCENT')
{'c': 2, 'e': 2, 'i': 2, 'l': 2, 'n': 2, 's': 2, 't': 2}
>>> occurrences('chachacha')
{'a': 3, 'h': 3, 'c': 3}
>>> occurrences('blahblahblahblah')
{'a': 4, 'h': 4, 'b': 4, 'l': 4}
>>> occurrences('intestine')
{'i': 2, 's': 1, 'e': 2, 't': 2, 'n': 2}

>>> balanced('Caucasus')
True
>>> balanced('teammate')
True
>>> balanced('SCINTILLESCENT')
True
>>> balanced('lysosome')
False
>>> balanced('intestines')
True
>>> balanced('mesosome')
True