import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        StringBuilder sb=new StringBuilder(sc.nextLine());
        List<Integer> list=new ArrayList<>();
        int count=0;
        Out:
        while(true){
            for (int i = 1; i <=10 ; i++) {
                if (i>sb.length()){break Out;}
                count++;
                list.add(shift(sb.substring(0,i)));
                sb.delete(0, i);
            }
        }
        System.out.println(count);
        for(Integer key:list){
            System.out.print(key+" ");
        }
    }
    static public int shift(String str){
        StringBuilder sb=new StringBuilder(str);
        sb.reverse();
        int result=0;
        for (int i = 0; i < sb.length(); i++) {
            result+=(sb.charAt(i)-'0')<<i;
        }
        return result;
    }
}