{ split(substr($0,1,length($0)/2),arr,"") r = substr($0,1+length($0)/2) for (a in arr) { c = arr[a] if (index(r,c)>0) { comm = c } } S += index("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", comm) } END {print S}