#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s, a[100];
  vector<int> vec;
  cin >> n;
  s = 0;
  while (n > 0) {
    a[s] = n % 10;
    n /= 10;
    s++;
  }
  for (int r, p, x = 0; x < 10; x++) {
    r = 0;
    p = 1;
    for (int i = 0; i < s; i++) {
      if (a[i] > 0) {
        a[i]--;
        r += p;
      }
      p *= 10;
    }
    if (r == 0) {
      break;
    }
    vec.push_back(r);
  }
  cout << vec.size() << endl;
  for (int i = 0; i < vec.size(); i++) {
    cout << vec[i] << " ";
  }
  cout << endl;
  return 0;
}
