    #include <iostream>
    #include <cmath>
    
    using namespace std;

    unsigned long powTable[] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000 };
    
    int quasi_binary(int num, int tens)
    {
    	int res,digit;
    
    	if(num == 0)
    	{
    		return 0;
    	}
    
    	digit = num%10;
    	num = num/10;
    
    	res = quasi_binary(num, tens+1);
    
    	if(digit)
    	{
    		cout << 1;
    		return ((digit-1)*powTable[tens]+res);
    	}
    	else
    	{
    		cout << 0;
    		return res;
    	}
    }
    
    int main()
    {
    	int n,k=-1,temp,digit;
    	cin >> n;
    
    	//this loop calculates the value of k,as it needs to be printed first
    	temp=n;
    	while(temp)
    	{
    		digit = temp%10;
    		temp = temp/10;
    
    		if(digit>k)
    			k=digit;
    	}
    	cout << k << endl;
    
    	//print those k quasi-numbers
    	while(n)
    	{
    		n = quasi_binary(n,0);
    		cout << " ";
    	}
    	return 0;
    } 
