import java.util.Scanner; public class Ketairekae { public static void main(String[] args) { Scanner s = new Scanner(System.in); StringBuilder str = new StringBuilder(s.nextLine()); s.close(); for(int j = 0;j < str.length()-1;j++){ for(int i = 9;i > Integer.parseInt(str.substring(j, j+1));i--){ String I = Integer.toString(i); if(str.lastIndexOf(I) > j){ int k = str.lastIndexOf(I); char keep = str.charAt(k); str.setCharAt(k, str.charAt(j)); str.setCharAt(j, keep); break; } } } System.out.println(str); } }