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 i = 9;i > Integer.parseInt(str.substring(0, 1));i--){ String I = Integer.toString(i); if(str.lastIndexOf(I) > 0){ int k = str.lastIndexOf(I); char keep = str.charAt(k); str.setCharAt(k, str.charAt(0)); str.setCharAt(0, keep); } } System.out.println(str); } }