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.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.InputMismatchException;


public final class QuasiBinary
{
	private static int n, binary[], binaryCount[];
	private static InputReader reader;
	private static OutputWriter writer;
	
	public static void main(String[] args)
	{
		QuasiBinary binary = new QuasiBinary();
		
		reader = binary.new InputReader(System.in);
		writer = binary.new OutputWriter(System.out);
		
		getAttributes2();
		
		writer.flush();
		
		reader.close();
		writer.close();
	}
	
	public static void getAttributes()
	{
		int count;
		
		binary = new int[127];
		binaryCount = new int[127];
		
		count = 1;
		binary[0] = 1;
		
		for (int i = 0; count < 127; i++)
		{
			binary[count++] = binary[i] * 10;
			binary[count++] = binary[i] * 10 + 1;
			
			// count++;
		}
		
/*		for (int i = 0; i < 127; i++)
			System.out.print(binary[i] + " ");*/
		
		int i = 126;
		
		n = reader.nextInt();
		count = 0;
		
		while (n > 0)
		{
			binaryCount[i] = n / binary[i];
			n = n - (binary[i] * binaryCount[i]);
			count += binaryCount[i];
			
			i--;
		}
		
		writer.println(count);
		
		for (int j = 0; j < 127; j++)
			while (binaryCount[j] > 0)
			{
				writer.print(binary[j] + " ");
				
				binaryCount[j]--;
			}
	}
	
	public static void getAttributes2()
	{
		int a[] = new int[1000000];
		
		n = reader.nextInt();
		
		if (n < 10)
		{
			lessThan10();
			
			return;
		}
		
		int temp = 1000000;
		int count, tempCount;
		
		count = tempCount = 0;

		while (n > 0)
		{
/*			writer.println(n);
			writer.println("temp : " + temp);*/
			
			while (n / temp == 0)
				temp /= 10;

			tempCount = 0;

			while (n >= temp)
			{
				a[tempCount++] += temp;
				n -= temp;
			}
			
			// count += tempCount;
			
			if (tempCount > count)
				count = tempCount;
			
			if (temp == 1)
				break;
			
/*			writer.println("currently, the array looks like : ");
			for (int i = 0; i < count; i++)
				writer.print(a[i] + " ");
			writer.println();*/
		}
		
		writer.println(count);
		
		for (int i = count - 1; i >= 0; i--)
			writer.print(a[i] + " ");
	}
	
	public static void lessThan10()
	{
		writer.println(n);
		
		for (int i = 0; i < n; i++)
			writer.print(1 + " ");
		
		writer.println();
	}
	
	class InputReader
	{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public InputReader(InputStream stream)
		{
			this.stream = stream;
		}

		public int read()
		{
			if (numChars == -1)
				throw new InputMismatchException();
			
			if (curChar >= numChars)
			{
				curChar = 0;
				try
				{
					numChars = stream.read(buf);
				}
				catch (IOException e)
				{
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			
			return buf[curChar++];
		}

		public int nextInt()
		{
			int c = read();
			
			while (isSpaceChar(c))
				c = read();
			
			int sgn = 1;
			
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			
			int res = 0;
			
			do
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				
				res *= 10;
				res += c & 15;
				
				c = read();
			} while (!isSpaceChar(c));
			
			return res * sgn;
		}

		public long nextLong()
		{
			int c = read();
			
			while (isSpaceChar(c))
				c = read();
			
			int sign = 1;
			
			if (c == '-')
			{
				sign = -1;
				
				c = read();
			}
			
			long result = 0;
			
			do
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				
				result *= 10;
				result += c & 15;
				
				c = read();
			} while (!isSpaceChar(c));
			
			return result * sign;
		}

		public String next()
		{
			int c = read();
			
			while (isSpaceChar(c))
				c = read();
			
			StringBuilder res = new StringBuilder();
			
			do
			{
				res.appendCodePoint(c);
				
				c = read();
			} while (!isSpaceChar(c));
			
			return res.toString();
		}

		public boolean isSpaceChar(int c)
		{
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public void close()
		{
			try
			{
				stream.close();
			}
			catch (IOException e)
			{
				e.printStackTrace();
			}
		}

	}

	class OutputWriter
	{
		private PrintWriter writer;

		public OutputWriter(OutputStream stream)
		{
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(
					stream)));
		}

		public OutputWriter(Writer writer)
		{
			this.writer = new PrintWriter(writer);
		}

		public void println(int x)
		{
			writer.println(x);
		}

		public void print(int x)
		{
			writer.print(x);
		}

		public void println(long x)
		{
			writer.println(x);
		}

		public void print(long x)
		{
			writer.print(x);
		}

		public void println(String s)
		{
			writer.println(s);
		}

		public void print(String s)
		{
			writer.print(s);
		}
		
		public void println()
		{
			writer.println();
		}

		public void printSpace()
		{
			writer.print(" ");
		}

		public void flush()
		{
			writer.flush();
		}

		public void close()
		{
			writer.close();
		}

	}

}
