int main(){ int i,j,f=1,m,k; char s[10001]; gets(s); for(i=0;s[i]&&f;i++){ for(m=0,j=i+1;s[j]&&f;j++)if(s[j]>=m)m=s[j],k=j; if(s[i]