?
#include <stdio.h>
void atoA(char in[]){
int i=0;
while (in[i]!='\0'){
if(in[i]>='a'&&in[i]<='z'){
in[i]-=32;
}
i++;
}
}
void find(char in[],int out[]){
int i=0;
while (in[i]!='\0'){
if(in[i]>='A'&&in[i]<='Z'){
out[in[i]-65]++;
}
i++;
}
}
int second(int a[],char q[]){
int g=0;
int max=0;
int second=0;
for (int i = 0; i < 26;i++) {
if(a[i]>max){
max=a[i];
}
}
for (int i = 0; i < 26;i++) {
if(a[i]==max){
a[i]=0;
}
}
for (int i = 0; i < 26;i++) {
if(second<a[i]){
second=a[i];
}
}
int j=0;
for (int i = 0; i < 26;i++) {
if(a[i]==second){
q[j]=i+65;
j++;
}
}
q[j]='\0';
return g;
}
int main(){
char a[501]={0};
char q[26]={0};
int count[26]={0};
fgets(a,500,stdin);
atoA(a);
find(a,count);
second(count,q);
int i=0;
while (a[i] != '\0')
{
int j = 0;
while (q[j] != '\0')
{
if (a[i] == q[j])
{
printf("%c+%c:%d",q[j],(char)(q[j]+32),count[q[j]-65]);
return 0;
}
j++;
}
i++;
}
return 0;
}