#include <stdio.h>
#define LNOM 40

char effe(char *s) {
	char *t, car = 0;
	int max = 0, conta;
	while(*s != 0) {
		conta = 1;
		t = s + 1;
		while(*t != 0) {
			if(*s == *t)
				conta++;
			t++;
		}
		if(conta > max) {
			max = conta;
			car = *s;
		}
		s++;
	}
	return car;
}


main () {
	char nome[LNOM];
	printf("%c\n", effe(gets(nome)));
	return 0;
}