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.awt.Point;
import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.*;
import java.util.*;

public class Main {
	//////
	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}

	//////
	public static long modularExponentiation(long x, long n, long M) {
		long result = 1;
		while (n > 0) {
			if (n % 2 == 1)
				result = (result * x) % M;
			x = (x * x) % M;
			n = n / 2;
		}
		return result;
	}

	public static long modularExponentiation1(long x, long n) {
		long result = 1;
		while (n > 0) {
			if (n % 2 == 1)
				result = (result * x);
			x = (x * x);
			n = n / 2;
		}
		return result;
	}

	/////

	static public int fun(int num) {
		int prod = 1;
		while (num > 0) {
			if (num % 10 != 0) {
				prod = prod * (num % 10);
			}
			num = num / 10;
		}
		return prod;
	}

	public static boolean dfs(int x, int find, boolean[] visited, int[][] matrix) {

		boolean ans = false;
		if (x == find) {
			ans = true;
			return true;
		}
		for (int i = 0; i < 26; i++) {
			if (visited[i] == false && matrix[x][i] == 1) {
				visited[i] = true;
				ans = ans || dfs(i, find, visited, matrix);
			}
		}

		return ans;
	}

	static int lis(int arr[], int n, int k, int b) {
		int lis[] = new int[n];
		int i, j, max = 0;

		/* Initialize LIS values for all indexes */
		for (i = 0; i < n; i++)
			lis[i] = 1;

		/* Compute optimized LIS values in bottom up manner */
		for (i = 1; i < n; i++)
			for (j = 0; j < i; j++)
				if (arr[i] >= k * arr[j] + b && lis[i] < lis[j] + 1)
					lis[i] = lis[j] + 1;

		/* Pick maximum of all LIS values */
		for (i = 0; i < n; i++)
			if (max < lis[i])
				max = lis[i];

		return max;
	}

	public static void main(String[] args) throws IOException {

		FastReader scan = new FastReader();
		PrintWriter pw = new PrintWriter(System.out);

		String str=scan.next();
		int N=str.length();
		char[] B=new char[N];
		char[] A=str.toCharArray();
		int flag=0;
		ArrayList<String> arr=new ArrayList<String>();
		while(flag==0){
			flag=1;
			for(int i=0;i<A.length;i++){
			if(A[i]>48){
				A[i]--;
				B[i]='1';
				flag=0;
			}else{
				B[i]='0';
			}
			}
			if(flag==0){
			arr.add(new String(B));
			}
		}
		System.out.println(arr.size());
		for(int i=0;i<arr.size();i++){
			System.out.print(arr.get(i)+" ");
		}
	}
}