#include <bits/stdc++.h>
using namespace std;
int n, len = 0, flag;
int a[10];
int judge(int x) {
  int ret = 0;
  while (x) {
    a[len++] = x % 10;
    ret = max(ret, x % 10);
    x /= 10;
  }
  return ret;
}
int main() {
  cin >> n;
  int ans = judge(n);
  cout << ans << endl;
  for (int cnt = 0; cnt < ans; cnt++) {
    flag = 0;
    for (int i = len - 1; i >= 0; i--) {
      if (a[i]) {
        printf("1");
        a[i]--;
        flag = 1;
      } else if (flag)
        printf("0");
    }
    printf(" ");
  }
  return 0;
}
