#include <iostream>
#include <cstring>
#include <map>
using namespace std;

int main(){
    string str;
    cin>>str;
    multimap<char,int> m;
    int chars[256];
    memset(chars,0,sizeof(chars));
    for(int i=0;i<str.size();i++){
        if(str[i]>=65 && str[i]<=90)
            str[i]-=32;
        m.insert({str[i],i});
        chars[(int)str[i]]++;
    }
    for(int i=0;i<str.size();i++)
        if(chars[(int)str[i]]>1){
            for(auto j=m.lower_bound(str[i]);j!=m.upper_bound(str[i]);j++){
                if(j!=m.lower_bound(str[i]))
                    cout<<',';
                cout<<j->first<<':'<<j->second;
            }
            chars[(int)str[i]]=0;
            cout<<endl;
        }
}