#include <iostream>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(int argc, char** argv) {
	int n;
	cin>>n;
	int sum=0;
	int s=1;
	int nn=n;
	int nnn=n;
	while(n>0){
		n=n/10;
		sum++;
		s=s*10;
	}
	s=s/10;
	cout<<sum<<endl; 

    while(s>0){ 
		cout<<nn/s<<" ";   
    	nn=nn%s;   
   	 	s=s/10;
	}
   cout<<endl;
   	while(nnn>0){
		cout<<nnn%10;
		nnn=nnn/10;
	}
	return 0;
	
}
/**************************************************************
	Problem: 1962
	User: admin
	Language: C++
	Result: Accepted
	Time:8 ms
	Memory:2072 kb
****************************************************************/