#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
cout<<"Enter the string:"<<endl;
string s;
cin>>s;
int N = s.length();
vector<int> n(N,1);
for(int i = 0;i < N;i++)
{
for(int j = i + 1;j < N;j++)
{
if(s[i] == s[j])
n[i] += 1;
}
}
int n_max = n[0];
for(int i = 1;i < N;i++)
{
if(n[i] > n_max)
n_max = n[i];
}
for(int i = 0;i < N;i++)
{
if(n[i] == n_max)
{
cout<<"出现最多次数的字母:"<<s[i]<<";次数:"<<n[i]<<endl;
}
}
}