#include <iostream>
#include <cstring>
using namespace std;
void lowerCase(char line[]) {
for (int i = 0; line[i] != '\0'; ++i) {
if (line[i] >= 'A' && line[i] <= 'Z') {
line[i] = line[i] + ('a' - 'A');
}
}
}
char findMostFrequentLowercase(char text[]) {
const int ALPHABET_SIZE = 26;
int letterFrq[ALPHABET_SIZE] = {0};
for (int i = 0; text[i] != '\0'; ++i) {
if (text[i] >= 'a' && text[i] <= 'z') {
letterFrq[text[i] - 'a']++;
}
}
char mostFrequentChar = 0;
int maxCount = 0;
for (int i = 0; i < ALPHABET_SIZE; ++i) {
if (letterFrq[i] > maxCount) {
maxCount = letterFrq[i];
mostFrequentChar = 'a' + i;
}
}
return mostFrequentChar;
}
const int MAX_SIZE = 256;
int main() {
char line[MAX_SIZE + 1], allText[MAX_SIZE + 1] = "";
int allTextLength = 0;
while (cin.getline(line, MAX_SIZE + 1)) {
if (strlen(line) == 0) {
break;
}
lowerCase(line);
/*for (int i = 0; line[i] != '\0'; ++i) {
allText[allTextLength++] = line[i];
}
}
allText[allTextLength] = '\0';*/
strcat(allText, line);
}
char mostFrequent = findMostFrequentLowercase(allText);
cout << mostFrequent << endl;
return 0;
}