#include <bits/stdc++.h>
using namespace std;
bool cmp(int a, int b) { return a > b; }
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  long long n, i, j, ma = 0;
  n = s.size();
  for (i = 0; i < n; i++) {
    s[i] = s[i] - 48;
    if (s[i] > ma) ma = s[i];
  }
  cout << ma << endl;
  for (i = 0; i < 9; i++) {
    long long k = 0;
    for (j = 0; j < n; j++) {
      if (s[j] > 0) {
        s[j]--;
        k = 9;
        cout << "1";
      } else if (s[j] == 0 && k == 9)
        cout << "0";
    }
    cout << " ";
  }
}
