import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
HashMap<Character, Integer> map = new HashMap<>();
for(int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
map.put(c, map.getOrDefault(c, 0) + 1);
}
Collection<Character> keySet = map.keySet();
ArrayList list = new ArrayList(keySet);
Collections.sort(list);
for(int j = 0; j < list.size(); j++) {
System.out.print(list.get(j));
System.out.print(map.get(list.get(j)));
}
}
}