company logo hackerrank solution
# Company Logo in python - Hacker Rank Solution
# python 3
#!/bin/python3
# Company Logo in python - Hacker Rank Solution START
import math
import os
import random
import re
import sys
import collections
if __name__ == '__main__':
s = sorted(input().strip())
s_counter = collections.Counter(s).most_common()
s_counter = sorted(s_counter, key=lambda x: (x[1] * -1, x[0]))
for i in range(0, 3):
print(s_counter[i][0], s_counter[i][1])
# Company Logo in python - Hacker Rank Solution END