import java.util.Arrays; import java.util.Scanner; public class No256 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); sc.close(); int len = String.valueOf(n).length(); int[] arrayN = new int[len]; int d = (int)Math.pow(10, len-1); for(int i = 0; i < len; i++){ arrayN[i] = n / d; n = n % d; d = d / 10; } Arrays.sort(arrayN); for (int i = len - 1; i >=0; i--){ System.out.println(arrayN[i]); } } }