for(i in s=readline())d=s.lastIndexOf(c=s[i])-i,d&&print(c+':',d)