import re

def checkio(text):
    text = re.sub('[^a-z]', '', text.lower())

    alph = {}
    for char in text:
        if char not in alph.keys():
            alph[char] = text.count(char)
            
    return sorted(alph.items(), key=lambda x: (-x[1], x[0]))

if __name__ == '__main__':
    print( checkio("Hellooaaaacccc bbbbWorld!") )
