import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNext()) { String s = sc.next(); //找一个最大的字符 找一个最小的字符 就好 int n = s.charAt(0)-'0'; int m = s.charAt(1)-'0'; int j = s.charAt(2)-'0'; char max = (char) (Math.max(n, Math.max(m,j))+'0'); char min = (char) (Math.min(n, Math.min(m,j))+'0'); char mid = '0'; for(int i = 0 ; i < 3 ; i++) { if(s.charAt(i)!=min&&s.charAt(i)!=max) mid = s.charAt(i); } System.out.println(min+" "+mid+" "+max); } } }