from collections import defaultdict

word_counts = defaultdict(int)

for w in open('bigrams.txt').read().decode('utf-8').split('\n'):
    word_counts[w] += 1
for w,c in word_counts.iteritems():
	print word_counts[w],w.encode('utf-8')
