#include <bits/stdc++.h>
using namespace std;
int x[100005] = {};
int main() {
  int n;
  int w[100] = {};
  cin >> n;
  int r = n;
  int i = 0;
  int m = 0;
  while (r > 0) {
    w[i] = r % 10;
    m = max(m, w[i]);
    r /= 10;
    i++;
  }
  cout << m << endl;
  for (int j = 0; j < m; j++) {
    int ans = 0;
    int P = 1;
    for (int k = 0; k < i; k++) {
      if (w[k]) {
        ans += P;
        w[k]--;
      }
      P *= 10;
    }
    cout << ans << " ";
  }
  return 0;
}
