import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String a = sc.nextLine();
Map<Character, Integer> map = new HashMap<>();
int max = -1;
for (int i = 0; i < a.length(); i++) {
if (map.get(a.charAt(i)) != null) {
int num = map.get(a.charAt(i));
num++;
map.put(a.charAt(i), num);
} else {
map.put(a.charAt(i), 1);
}
}
Object[] arr = map.entrySet().toArray();
String[] arr2 = null;
for (int i = 0; i < arr.length; i++) {
arr2 = (arr[i] + "").split("=");
System.out.println(arr2);
if ((Integer.parseInt(arr2[1])) >= max) {
max = (Inte