• + 0 comments
    from collections import Counter
    
    your_string = input()
    # your_string = "qwertyuiopasdfghjklzxcvbnm"
    char_counts = Counter(sorted(your_string))
    # print(char_counts)  # Output: Counter
    
    _keys = char_counts.most_common(3)
    first_char = _keys[0]
    second_char = _keys[1]
    third_char = _keys[2]
    print(first_char[0] + " " + str(first_char[1]))
    print(second_char[0] + " " + str(second_char[1]))
    print(third_char[0] + " " + str(third_char[1]))