#include<bits/stdc++.h>
using namespace std;
int main()
{
string str;
while(getline(cin,str))
{
int num1[255] = {0};
bool num2[255] = {false};
int len = str.length();
for(int i = 0;i<len;i++)
{
num1[str[i]]++;
}
for(int i = 0;i<len;i++)
{
int flag2 = 0;
if(!num2[str[i]]&&num1[str[i]]>1)
{
char flag = str[i];
for(int j = i;j<len;j++)
{
if(str[j] == flag)
{
if(flag2 == 0)
{
cout<<flag<<":"<<j;
flag2 = 1;
}
else {
cout<<","<<flag<<":"<<j;
}
}
}
num2[str[i]] = true;
cout<<endl;
}
else {
continue;
}
}
}
return 0;
}



京公网安备 11010502036488号