import java.util.*; public class Main{ public static void main(String[] arg){ Scanner s=new Scanner(System.in); while(s.hasNextLine()){ String ss=s.nextLine(); int[] arr=new int[36]; for(int i=0;i<ss.length();i++){ if(ss.charAt(i)>=48&&ss.charAt(i)<=57){ arr[ss.charAt(i)-'0']=arr[ss.charAt(i)-'0']+1; }else{ arr[ss.charAt(i)-'a'+10]=arr[ss.charAt(i)-'a'+10]+1; } } int[] indexArr=new int[arr.length]; for(int i=0;i<indexArr.length;i++){ indexArr[i]=i; } int temp=0; int index=0; //排序--冒泡 for (int i = 0; i < arr.length; i++) { for (int j = 0; j < arr.length - i - 1; j++) { if (arr[j] < arr[j + 1]) { temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp; index = indexArr[j]; indexArr[j] = indexArr[j + 1]; indexArr[j + 1] = index; } } } for(int i=0;i<arr.length;i++){ if(arr[i]!=0){ System.out.print(indexArr[i]<10?(char)(indexArr[i]+'0'):(char)(indexArr[i]-10+'a')); } } System.out.println(); } } }