while i > 0 and not name[i].isalpha():
                i -= 1