#include <bits/stdc++.h>
using namespace std;

char maxOccuringChar(string text)
{
	int maxfreq = 0;
	char maxchar;
	map<char,int> freq;
	for (char c : text)
	{
		freq[c]++;
		if (freq[c] > maxfreq)
		{
			maxfreq = freq[c];
			maxchar = c;
		}
	}
	return maxchar;
	
}
int main() {
	string text;
	cin >> text;
	cout << maxOccuringChar(text);
}