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.math.BigInteger;
import java.util.*;

/**
 *
 * @author Saju
 *
 */

public class Main {

	public static void main(String[] args) {

		InputReader in = new InputReader(System.in);
		PrintWriter out = new PrintWriter(System.out);

/*



*/
		
		String str = in.next();
		
		char ch[] = str.toCharArray();
		int max = 0;
		for(int i = 0; i < ch.length; i++){
			max = max(max, ch[i] - '0');
		}
		out.println(max);
		
		for(int i = 0; i < max; i++){
			StringBuilder sb = new StringBuilder();
			for(int j = 0; j < ch.length; j++){
				if(ch[j] - '0' > 0){
					ch[j]--;
					sb.append('1');
				}
				else{
					sb.append('0');
				}
			}
			StringBuilder sb1 = new StringBuilder();
			boolean found = false;
			for(int j = 0; j < sb.length(); j++){
				if(sb.charAt(j) == '0' && !found){
				}
				else{
					found = true;
					sb1.append(sb.charAt(j));
				}
			}
			out.print(sb1.toString() + " ");
		}
		
		out.flush();
		out.close();
		System.exit(0);
	}
	
	
	


	private static class Pair{
		int x;
		int y;
		Pair(int x, int y){
			this.x = x;
			this.y = y;
		}
	}
	
	private static int log(int x, int base) {
		return (int) (Math.log(x) / Math.log(base));
	}

	private static long max(long a, long b) {
		if (a >= b) {
			return a;
		}
		return b;
	}
	
	private static int max(int a, int b) {
		if (a >= b) {
			return a;
		}
		return b;
	}

	private static long min(long a, long b) {
		if (a <= b) {
			return a;
		}
		return b;
	}
	
	private static long gcd(long a, long b) {
		if (b == 0) {
			return a;
		}
		return gcd(b, a % b);
	}
	
	private static int gcd(int a, int b) {
		if (b == 0) {
			return a;
		}
		return gcd(b, a % b);
	}

	private static long bigMod(long n, long k, long m) {

		long ans = 1;
		while (k > 0) {
			if ((k & 1) == 1) {
				ans = (ans * n) % m;
			}
			n = (n * n) % m;
			k >>= 1;
		}
		return ans;
	}

	/*
	 * Returns an iterator pointing to the first element in the range [first,
	 * last] which does not compare less than val.
	 * 
	 */
	private static int lowerBoundNew(long[] arr, long num) {
		int start = 0;
		int end = arr.length - 1;
		int index = 0;
		int len = arr.length;
		int mid = 0;
		while (true) {
			if (start > end) {
				break;
			}
			mid = (start + end) / 2;
			if (arr[mid] > num) {
				end = mid - 1;
			} else if (arr[mid] < num) {
				start = mid + 1;
			} else {
				while (mid >= 0 && arr[mid] == num) {
					mid--;
				}
				return mid + 1;
			}
		}
		if (arr[mid] < num) {
			return mid + 1;
		}
		return mid;
	}

	/*
	 * upper_bound() is a standard library function in C++ defined in the header
	 * . It returns an iterator pointing to the first element in the range
	 * [first, last) that is greater than value, or last if no such element is
	 * found
	 * 
	 */
	private static int upperBoundNew(long[] arr, long num) {

		int start = 0;
		int end = arr.length - 1;
		int index = 0;
		int len = arr.length;
		int mid = 0;
		while (true) {
			if (start > end) {
				break;
			}
			mid = (start + end) / 2;
			if (arr[mid] > num) {
				end = mid - 1;
			} else if (arr[mid] < num) {
				start = mid + 1;
			} else {
				while (mid < len && arr[mid] == num) {
					mid++;
				}
				if (mid == len - 1 && arr[mid] == num) {
					return mid + 1;
				} else {
					return mid;
				}
			}
		}
		if (arr[mid] < num) {
			return mid + 1;
		}
		return mid;
	}

	private static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream));
			tokenizer = null;
		}

		public String next() {
			try {
				while (tokenizer == null || !tokenizer.hasMoreTokens()) {
					tokenizer = new StringTokenizer(reader.readLine());

				}
			} catch (IOException e) {
				return null;
			}
			return tokenizer.nextToken();
		}

		public String nextLine() {
			String line = null;
			try {
				tokenizer = null;
				line = reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
			return line;
		}

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

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

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

		public boolean hasNext() {
			try {
				while (tokenizer == null || !tokenizer.hasMoreTokens()) {
					tokenizer = new StringTokenizer(reader.readLine());
				}
			} catch (Exception e) {
				return false;
			}
			return true;
		}
	}
	
	private class TrieTusar {

	    private class TrieNode {
	        Map<Character, TrieNode> children;
	        boolean endOfWord;
	        public TrieNode() {
	            children = new HashMap<>();
	            endOfWord = false;
	        }
	    }

	    private final TrieNode root;
	    public TrieTusar() {
	        root = new TrieNode();
	    }
	    
	    public void test(String[] args){
	    	
	    
	    	TrieTusar ttr = new TrieTusar();
	    	ttr.insert("baggers");
	    	ttr.insert("beggars");
	    	ttr.insert("in");
	    	ttr.insert("the");
	    	ttr.insert("blowed");
	    	ttr.insert("bowled");
	    	ttr.insert("barn");
	    	ttr.insert("bran");

	    	
	    }

	    /**
	     * Iterative implementation of insert into trie
	     */
	    public void insert(String word) {
	        TrieNode current = root;
	        for (int i = 0; i < word.length(); i++) {
	            char ch = word.charAt(i);
	            TrieNode node = current.children.get(ch);
	            if (node == null) {
	                node = new TrieNode();
	                current.children.put(ch, node);
	            }
	           
	            current = node;
	          
	        }
	       
	        //mark the current nodes endOfWord as true
	        current.endOfWord = true;
	    }

	    /**
	     * Recursive implementation of insert into trie
	     */
	    public void insertRecursive(String word) {
	        insertRecursive(root, word, 0);
	    }


	    private void insertRecursive(TrieNode current, String word, int index) {
	        if (index == word.length()) {
	            //if end of word is reached then mark endOfWord as true on current node
	            current.endOfWord = true;
	            return;
	        }
	        char ch = word.charAt(index);
	        TrieNode node = current.children.get(ch);

	        //if node does not exists in map then create one and put it into map
	        if (node == null) {
	            node = new TrieNode();
	            current.children.put(ch, node);
	        }
	        insertRecursive(node, word, index + 1);
	    }

	    /**
	     * Iterative implementation of search into trie.
	     */
	    public boolean search(String word) {
	        TrieNode current = root;
	        for (int i = 0; i < word.length(); i++) {
	            char ch = word.charAt(i);
	            TrieNode node = current.children.get(ch);
	            //if node does not exist for given char then return false
	            if (node == null) {
	                return false;
	            }
	            current = node;
	        }
	        //return true of current's endOfWord is true else return false.
	        return current.endOfWord;
	    }

	    /**
	     * Recursive implementation of search into trie.
	     */
	    public boolean searchRecursive(String word) {
	        return searchRecursive(root, word, 0);
	    }
	    private boolean searchRecursive(TrieNode current, String word, int index) {
	        if (index == word.length()) {
	            //return true of current's endOfWord is true else return false.
	            return current.endOfWord;
	        }
	        char ch = word.charAt(index);
	        TrieNode node = current.children.get(ch);
	        //if node does not exist for given char then return false
	        if (node == null) {
	            return false;
	        }
	        return searchRecursive(node, word, index + 1);
	    }

	    /**
	     * Delete word from trie.
	     */
	    public void delete(String word) {
	        delete(root, word, 0);
	    }

	    /**
	     * Returns true if parent should delete the mapping
	     */
	    private boolean delete(TrieNode current, String word, int index) {
	        if (index == word.length()) {
	            //when end of word is reached only delete if currrent.endOfWord is true.
	            if (!current.endOfWord) {
	                return false;
	            }
	            current.endOfWord = false;
	            //if current has no other mapping then return true
	            return current.children.size() == 0;
	        }
	        char ch = word.charAt(index);
	        TrieNode node = current.children.get(ch);
	        if (node == null) {
	            return false;
	        }
	        boolean shouldDeleteCurrentNode = delete(node, word, index + 1);

	        //if true is returned then delete the mapping of character and trienode reference from map.
	        if (shouldDeleteCurrentNode) {
	            current.children.remove(ch);
	            //return true if no mappings are left in the map.
	            return current.children.size() == 0;
	        }
	        return false;
	    }
	    
	    
	}
}
	  		   					  	 	 	  					 	 	