i am getting one wrong case with this code
string s;
cin>>s;
int n=s.length();
sort(s.begin(),s.end());
int i,j,cs=1,ms=1;
char ch;
for(i=0;i<n;i++){
if(s[i+1]!=s[i]){
ms=1;
}
else{
ms++;
}
if(ms>cs){
cs=ms;
ch = s[i];}
}
if(i==n){
cout<<ch;
}