#include <bits/stdc++.h>
using namespace std;
int main(int nargs, char** args) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  string n;
  cin >> n;
  vector<string> quaskis(9, "");
  unsigned int l = 0;
  for (int i = n.size() - 1; i >= 0; --i) {
    unsigned int k = n[i] - '0';
    l = max(l, k);
    for (unsigned int j = 0; j < k; ++j) {
      quaskis[j] = '1' + quaskis[j];
    }
    for (unsigned int j = k; j < 9; ++j) {
      quaskis[j] = '0' + quaskis[j];
    }
  }
  cout << l << endl;
  for (unsigned int i = 0; i < l; ++i) {
    unsigned int j = 0;
    while (quaskis[i][j] == '0') quaskis[i] = quaskis[i].substr(1);
    cout << quaskis[i] << ' ';
  }
  return 0;
}
