09/11/14 16:17:55
>463
import java.io.*;
public class P68_463_1 {
public static void main(String[] args) throws IOException {
new P68_463_1().process();
}
public void process() throws IOException {
System.out.printf("文字列を入力してください%n");
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
char[] result = new char[str.length()];
for(int i=0; i<str.length(); i++) {
result[i] = str.charAt(i);
}
for(int i=0; i<result.length-1; i++) {
for(int j=result.length-1; j>i; j--) {
if(result[j] < result[j-1]) {
char tmp = result[j];
result[j] = result[j-1];
result[j-1] = tmp;
}
}
}
System.out.printf(new String(result) + "%n");
}
}