#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
freopen("test.in", "r", stdin);
freopen("test.out", "w", stdout);
#endif
int n;
scanf("%d", &n);
int t = n, sum = 0;
while (t) {
sum = max(t % 10, sum);
t /= 10;
}
printf("%d\n", sum);
int tmp, x = 0, y = 0, numset[7][10] = {0}, w = 1;
while (n) {
tmp = n % 10, y = 0;
while (tmp) {
numset[x][y++] = w;
tmp--;
}
n /= 10, x++, w *= 10;
}
for (int i = 0; i < sum; i++) {
int res = 0;
for (int j = 0; j < 7; j++) {
res += numset[j][i];
}
printf("%d ", res);
}
return 0;
}