class G_tost {
public static int getCount(String s, char ch) {
int res = 0;
for (int i = 0; i < s.length(); i++) {
res += s.charAt(i) == ch ? 1 : 0;
}
return res;
}
public static void main(String[] args) {
String data = "hhyhddrdffrfaasxf";
int ans = 0;
char ch = data.charAt(0);
for (int i = 0; i < data.length(); i++) {
int l = getCount(data, data.charAt(i));
if (ans < l) {
ch = data.charAt(i);
ans = l;
}
}
System.out.format("Char: %c, count: %d\n", ch, ans);
}
}