#include
#include
using namespace std;
void MaxOccurence(char str[1000]){
pair<char,int> str1;
int n = 1;
int a =0;
// to find the size of entered string.
while(str[a] != β\0β){
n++;
a++;
}
int sum;
// to calculate the occurence of each alphabet in the string.
// and storing them in another pair with its number of occurences.
for(int i=0;i<n;i++){
sum =1;
for(int j=i+1;j<n;j++){
if(str[i]==str[j]){
sum++;
}
}
str1.first[i] = str[i];
str1.second[i] = sum;
}
int max = 0;
char chmax;
// finding out the max occurence and its corresponding alphabet.
for(int i=0;i<n;i++){
if(str1.second[i]>max){
max = str1.second[i];
chmax = str1.first[i];
}
}
// print the most occured alphabet.
cout<<chmax;
}
int main() {
char str[1000];
cin>>str;
MaxOccurence(str);
return 0;
}