package m.shin; import java.util.Scanner; public class Con256 { public static void main(String[] args) { Scanner s = new Scanner(System.in); String n = s.nextLine(); s.close(); int[] a = new int[10]; for(int i = 0;i < n.length();i++){ a[Integer.parseInt(n.substring(i, i+1))]++; } n = ""; for(int i = 9;i >= 0;i--){ for(int j = 0;j < a[i];j++){ n += Integer.toString(i); } } System.out.println(n); } }