#include<bits/stdc++.h>
using namespace std;
vector<int> v[10000];
int main()
{
int n;
scanf("%d",&n);
while(n!=0)
{
int ss=0,temp=n;
while(temp!=0)
{
temp/=10;
ss++;
}
int num=pow(10,ss-1);
//temp=n;
temp=n/num;
n=n%num;
for(int i=0;i<temp;i++)
{
v[i].push_back(num);
}
}
vector<int> res;
for(int i=0;i<1000;i++)
{
if(v[i].size())
res.push_back(0);
for(int j=0;j<v[i].size();j++)
{
res[i]+=v[i][j];
}
}
printf("%d\n",res.size());
for(int i=0;i<res.size();i++)
printf("%d ",res[i]);
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCnZlY3RvcjxpbnQ+IHZbMTAwMDBdOwppbnQgbWFpbigpCnsKICBpbnQgbjsKICBzY2FuZigiJWQiLCZuKTsKICB3aGlsZShuIT0wKQogIHsKICAgIGludCBzcz0wLHRlbXA9bjsKICAgIHdoaWxlKHRlbXAhPTApCiAgICB7CiAgICAgIHRlbXAvPTEwOwogICAgICBzcysrOwogICAgfQogICAgaW50IG51bT1wb3coMTAsc3MtMSk7CiAgICAvL3RlbXA9bjsKICAgIHRlbXA9bi9udW07CiAgICBuPW4lbnVtOwogICAgZm9yKGludCBpPTA7aTx0ZW1wO2krKykKICAgIHsKICAgICAgdltpXS5wdXNoX2JhY2sobnVtKTsKICAgIH0KICB9CiAgdmVjdG9yPGludD4gcmVzOwogIGZvcihpbnQgaT0wO2k8MTAwMDtpKyspCiAgewogICAgaWYodltpXS5zaXplKCkpCiAgICAgIHJlcy5wdXNoX2JhY2soMCk7CiAgICBmb3IoaW50IGo9MDtqPHZbaV0uc2l6ZSgpO2orKykKICAgIHsKICAgICAgcmVzW2ldKz12W2ldW2pdOwogICAgfQogIH0KICBwcmludGYoIiVkXG4iLHJlcy5zaXplKCkpOwogIGZvcihpbnQgaT0wO2k8cmVzLnNpemUoKTtpKyspCiAgICBwcmludGYoIiVkICIscmVzW2ldKTsKICByZXR1cm4gMDsKfQogIAogIA==