import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class Test2 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("輸入要輸入的字符串");
String tagit1 = br.readLine();
String tagit = tagit1.toLowerCase();//大小寫都是壹個認識為同壹字符
int temp=0,posit=0;
int letter[] = new int[26];
for (int i = 0; i < tagit.length(); i++) {
char a = tagit.charAt(i);
letter[a - 97]++;
}
for(int i=0;i< letter.length;i++){
if(letter[i]>temp)
{
temp=letter[i];
posit=i;
}
}
System.out.println("字符出現次數最多的是"+(char)(posit+97)+"出現次數為"+temp);
}
}