#include <iostream>
#include <vector>
#include <unordered_map>
using namespace std;
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    string s;
    cin >> s;
    unordered_map<char, vector<int>> my_map;
    for (int i = 0; i < s.size(); ++i) my_map[s[i]].push_back(i);
    unordered_map<char, bool> isVisited;
    for (const char &c: s) {
        if (isVisited[c]) continue;
        isVisited[c] = true;
        const vector<int> &v = my_map[c];
        if (v.size() > 1) {
            for (const int &j: v) {
                cout << c << ':' << j;
                if (j != v.back()) cout << ',';
            }
            cout << '\n';
        }
    }
    return 0;
}