#include <iostream> #include <string> #include <vector> using namespace std; const int N = 101; string str; vector<int> pos[N]; int main() { while (cin >> str) { for(int i = 0; i < str.size(); i ++){ pos[str[i]].push_back(i); } for(int i = 0; i < str.size(); i ++){ if(pos[str[i]].size() > 1){ for(int j = 0; j < pos[str[i]].size(); j ++){ if(j == 0) cout << str[i] << ":" << pos[str[i]][j]; else cout << "," <<str[i] << ":" << pos[str[i]][j]; } pos[str[i]].clear(); cout << endl; } } } return 0; } // 64 位输出请用 printf("%lld")