111111
 100009
 10011
 1000000
 8
 10201
 102030
 908172
 123456
 415
 900000
 21
 909090
 314159
 999999
 909823
 987654
 1453
 1435
 98
 10
 2
 1

1
111111
 9
100001 1 1 1 1 1 1 1 1
 1
10011
 1
1000000
 8
1 1 1 1 1 1 1 1
 2
10101 100
 3
101010 1010 10
 9
101111 101011 101010 101010 101010 101010 101010 101000 100000
 6
111111 11111 1111 111 11 1
 5
111 101 101 101 1
 9
100000 100000 100000 100000 100000 100000 100000 100000 100000
 2
11 10
 9
101010 101010 101010 101010 101010 101010 101010 101010 101010
 9
111111 101011 101011 1011 11 1 1 1 1
 9
111111 111111 111111 111111 111111 111111 111111 111111 111111
 9
101111 101111 101101 101100 101100 101100 101100 101100 101000
 9
111111 111111 111111 111111 111110 111100 111000 110000 100000
 5
1111 111 111 110 10
 5
1111 111 111 101 1
 9
11 11 11 11 11 11 11 11 10
 1
10
 2
1 1
 1
1

import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Locale;
import java.util.StringTokenizer;

public class div12_300_B implements Runnable {

    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") == null;

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args) {

        new Thread(null, new div12_300_B(), "", 128 * (1L << 20)).start();

    }

    void init() throws FileNotFoundException {
        Locale.setDefault(Locale.US);
        if (ONLINE_JUDGE) {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        } else {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        }
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();

            init();
            solve();

            out.close();
            time();
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    String readString() throws IOException {

        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    String readString(String s) throws IOException {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine(), s + "\n \t");
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    int readInt(String s) throws IOException {
        return Integer.parseInt(readString(s));
    }

    boolean isPrime(int a) throws IOException {
        int del = 0;
        for (int i = 2; i < Math.sqrt(a) + 2; i++) {
            if (a % i == 0) {
                del = i;
                break;
            }
        }
        if (del > 0) {
            return false;
        } else return true;
    }

    void solve() throws IOException {
        int sum=readInt();
        int subst[] = new int[Integer.toString(sum).length()];
        ArrayList<Integer> solution = new ArrayList<>();
        System.out.println(Integer.toString(sum).length());
        for(int i=0;i<subst.length;i++){
            subst[subst.length-i-1]=sum%10;
            sum/=10;
        }
        boolean f=true;
        while(f){
            f=false;
            StringBuilder sb = new StringBuilder();
            for(int i=0;i<subst.length;i++){

                if(subst[i]!=0){
                    f=true;
                    sb.append("1");
                    subst[i]--;
                }else {
                    sb.append("0");
                }
            }
            solution.add(Integer.parseInt(sb.toString()));
        }
        System.out.println(solution.size()-1);

        for (int i1 = 0; i1 < solution.size()-1; i1++) {
            int i = solution.get(i1);
            System.out.print(i + " ");
        }


    }


}
