• Code works but doesn't get pass the 'check'

Question related to mission The Most Wanted Letter

 
def  f(x) :
    if len(x) >10e5 :
        return 'sentence is extremely long'     
    x=x.lower()
    l=[] 
    d={} 
    for u in x:
        if u in 'aqwertyuioplkjhgfdszxcvbnm' :
            l.append(u)
            d[u] =0
    for i in l :
        d[i] +=1
    a=[[i, d[i]] for i in d]   
    a.sort(key=lambda x:x[1], reverse=True)
    for i in a:
        return i[0]

It works with all the assert statements but doesn't get pass the check Please fix