import java.util.Scanner;
public class Test {
public static void main(String[] args) {
System.out.println("Please input some characters: ");
String input = new Scanner(System.in).nextLine();
char[] ary = input.toCharArray();
Arrays.sort(ary);
System.out.println("After sorting by dictionary order, the string is: " + String.valueOf(ary));
}
}