# Write a program to compute the frequency of the words from the input.
#  The output should output after sorting the key alphanumerically.

freq = {}   # frequency of words in text
line = raw_input("Enter the string: ")
for word in line.split():
    freq[word] = freq.get(word, 0)+1

words = freq.keys()
words.sort()

for w in words:
    print "%s:%d" % (w, freq[w])