#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  string s;
  cin >> s;
  int m = 0;
  for (int i = 0; i < s.length(); i++) {
    m = max(m, s[i] - '0');
  }
  cout << m << "\n";
  for (int i = 0; i < m; i++) {
    int p = 0;
    for (int j = 0; j < s.length(); j++) {
      if (s[j] - '0')
        p = p * 10 + 1;
      else
        p *= 10;
      s[j] = max((int)'0', (int)s[j] - 1);
    }
    cout << p << " ";
  }
  return 0;
}
