#include<iostream>
#include<unordered_set>
#include<string>
using namespace std;
int main(){
string s1;
while(cin>>s1){
unordered_set<char> mySet;
for(int i = 0;i<s1.length();i++){
char ch = s1[i];
auto it = mySet.find(ch);
if(it!=mySet.end()){
//该元素已经存在,可以直接跳过
}else{
bool flag = false;
mySet.insert(ch);
int count = 0;
for(int j = i + 1;j<s1.length();j++){
if(ch==s1[j]){
count++;
flag = true;
if(count==1) cout<<ch<<":"<<to_string(i);
cout<<",";
cout<<s1[j]<<":"<<to_string(j);
}
}
if(flag) cout<<endl;
}
}
}
}