import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Select_Algorithm {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
List<Integer> num = new ArrayList<>();
int N = Integer.parseInt(sc.nextLine());
while(N>0) {
num.add(N % 10);
N /= 10;
}
int startIndex = 0;
while(startIndex<num.size()-1) {
int maxIndex = startIndex;
int temp = 0;
for(int i=startIndex; i<num.size(); i++) {
if(num.get(i) > num.get(maxIndex)) {
maxIndex = i;
}
}
temp = num.get(startIndex);
num.set(startIndex,num.get(maxIndex));
num.set(maxIndex, temp);
startIndex++;
}
for(int value : num) {
System.out.print(value);
}
System.out.println();
}
}