#include <bits/stdc++.h>
int arr[1000], i, u, j, ans[10000], max = 100, e, t, k;
char n[1000];
int main() {
  scanf("%s", n);
  u = strlen(n);
  for (i = 0; i < u; i++)
    if ((n[i] - '0') > (n[max] - '0')) max = i;
  printf("%d\n", n[max] - '0');
  for (i = 1; i <= 10000; i++) {
    e = 0, k = 0;
    for (j = 0; j <= u - 1; j++)
      if ((n[j] - '0') - 1 >= 0) {
        printf("1");
        n[j]--;
        k = 1;
      } else if (n[j] == '0' and k) {
        printf("0");
      }
    printf(" ");
    if ((n[max] - '0') == 0) break;
  }
  return 0;
}
