#include <bits/stdc++.h>
using namespace std;
long long int modpow(long long int a, long long int n, long long int temp) {
  long long int res = 1, y = a;
  while (n > 0) {
    if (n & 1) res = (res * y) % temp;
    y = (y * y) % temp;
    n /= 2;
  }
  return res % temp;
}
vector<int> Q;
int a[20][20] = {0};
int main() {
  int i, j, k, l, n;
  cin >> n;
  j = 0;
  l = -1;
  while (n != 0) {
    k = (n % 10);
    for (i = 0; i < k; i++) {
      a[j][i] = 1;
    }
    l = ((l) > (k) ? (l) : (k));
    j++;
    n /= 10;
  }
  cout << l << endl;
  for (i = 0; i < l; i++) {
    long long int cur = 0, lst = 1;
    for (k = 0; k < j; k++) {
      cur += (lst * a[k][i]);
      lst *= 10;
    }
    cout << cur << " ";
  }
  cout << endl;
  return 0;
}
