def checkio(str):
str=str.lower()
letterResult=False
letterResultInstances=0
for i in range(len(str)):
letterCandidate=str[i]
if not letterCandidate.isalpha():
continue
letterCandidateInstances=0
for j in range(len(str)):
if str[j]==letterCandidate :
letterCandidateInstances+=1
if letterCandidateInstances>letterResultInstances or(letterCandidateInstances==letterResultInstances and ord(letterCandidate)