#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] = "";
while (cin.getline(line, MAX_SIZE + 1)) {
lowerCase(line);
strcat(allText, line);
}
char mostFrequent = findMostFrequentLowercase(allText);
cout << mostFrequent << "\n";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0cmluZz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCnZvaWQgbG93ZXJDYXNlKGNoYXIgbGluZVtdKSB7CiAgICBmb3IgKGludCBpID0gMDsgbGluZVtpXSAhPSAnXDAnOyArK2kpIHsKICAgICAgICBpZiAobGluZVtpXSA+PSAnQScgJiYgbGluZVtpXSA8PSAnWicpIHsKICAgICAgICAgICAgbGluZVtpXSA9IGxpbmVbaV0gKyAoJ2EnIC0gJ0EnKTsKICAgICAgICB9CiAgICB9Cn0KCmNoYXIgZmluZE1vc3RGcmVxdWVudExvd2VyY2FzZShjaGFyIHRleHRbXSkgewogICAgY29uc3QgaW50IEFMUEhBQkVUX1NJWkUgPSAyNjsKICAgIGludCBsZXR0ZXJGcnFbQUxQSEFCRVRfU0laRV0gPSB7MH07CiAgICBmb3IgKGludCBpID0gMDsgdGV4dFtpXSAhPSAnXDAnOyArK2kpIHsKICAgICAgICBpZiAodGV4dFtpXSA+PSAnYScgJiYgdGV4dFtpXSA8PSAneicpIHsKICAgICAgICAgICAgbGV0dGVyRnJxW3RleHRbaV0gLSAnYSddKys7CiAgICAgICAgfQogICAgfQogICAgY2hhciBtb3N0RnJlcXVlbnRDaGFyID0gMDsKICAgIGludCBtYXhDb3VudCA9IDA7CiAgICBmb3IgKGludCBpID0gMDsgaSA8IEFMUEhBQkVUX1NJWkU7ICsraSkgewogICAgICAgIGlmIChsZXR0ZXJGcnFbaV0gPiBtYXhDb3VudCkgewogICAgICAgICAgICBtYXhDb3VudCA9IGxldHRlckZycVtpXTsKICAgICAgICAgICAgbW9zdEZyZXF1ZW50Q2hhciA9ICdhJyArIGk7CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIG1vc3RGcmVxdWVudENoYXI7Cn0KCmNvbnN0IGludCBNQVhfU0laRSA9IDI1NjsKCmludCBtYWluKCkgewogICAgY2hhciBsaW5lW01BWF9TSVpFICsgMV0sIGFsbFRleHRbTUFYX1NJWkUgKyAxXSA9ICIiOwogICAgd2hpbGUgKGNpbi5nZXRsaW5lKGxpbmUsIE1BWF9TSVpFICsgMSkpIHsKICAgICAgICBsb3dlckNhc2UobGluZSk7CiAgICAgICAgc3RyY2F0KGFsbFRleHQsIGxpbmUpOwogICAgfQogICAgY2hhciBtb3N0RnJlcXVlbnQgPSBmaW5kTW9zdEZyZXF1ZW50TG93ZXJjYXNlKGFsbFRleHQpOwogICAgY291dCA8PCBtb3N0RnJlcXVlbnQgPDwgIlxuIjsKICAgIHJldHVybiAwOwp9