import java.util.*;
public class Main {
    public static void solve(String s) {
        int[] cnts = new int[128];
        char[] arr = s.toCharArray();
        for(char ch : arr) {
            cnts[ch]++;
        }
        for(char i = 'a'; i <= 'z'; i++) {
            if(cnts[i] < 1) continue;
            System.out.print(i);
            System.out.print(cnts[i]);
        }
        System.out.println();
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNextLine()) {
            String s = sc.nextLine();
            solve(s);
        }
    }
}