#include
#include
#include
using namespace std;
int main(){
char maxchar;
string s;
cin>>s;
long long int l=s.length();
int freq[l];
for(int i=0;i<l;i++){
freq[i]=1;
for(int j=i+1;j<l;j++){
if(s[i]==s[j] && s[i]!=‘0’){
freq[i]++;
s[j]=‘0’;
}
}
}
int max;
max = freq[0];
for(int i = 0; i <l; i++) {
if(max < freq[i]) {
max = freq[i];
maxchar = s[i];
}
}
cout<<maxchar;
}