#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> ans(10, 0);
  int t = 1, s = 0, b;
  while (n) {
    b = n % 10;
    s = max(s, b);
    for (int i = 0; i < b; i++) {
      ans[i] += t;
    }
    t *= 10;
    n /= 10;
  }
  cout << s << endl;
  for (int i = 0; i < s; i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
