/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
        String str = sc.next();
        LinkedHashMap<Character,Integer> lhm = new LinkedHashMap<Character,Integer>();
        int i = 0;
        while(i<str.length())
        {
            Integer count = lhm.get(str.charAt(i));
            lhm.put(str.charAt(i),(count==null)?1:count+1);
            i++;
        }
        lhm.forEach((key,val)->{
            System.out.print(key+""+val);
        });
	}
}