#include <bits/stdc++.h>
using namespace std;
int main() {
  string n;
  cin >> n;
  int len = n.length(), cnt = 0, maxx = 0;
  for (int i = 0; i < len; i++) {
    if (!(n[i] - '0')) cnt++;
    maxx = max(maxx, n[i] - '0');
  }
  cout << maxx << endl;
  while (1) {
    string tep = "";
    for (int i = 0; i < len; i++) {
      if (n[i] == '0')
        tep += "0";
      else {
        tep += "1";
        n[i]--;
        if (!(n[i] - '0')) cnt++;
      }
    }
    int s;
    for (s = 0; s < (int)tep.length(); s++)
      if (tep[s] - '0') break;
    for (; s < (int)tep.length(); s++) cout << tep[s];
    cout << ' ';
    if (cnt == len) break;
  }
  return 0;
}
