#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> num;
  int n;
  cin >> n;
  int k = -1, tmp;
  while (n > 0) {
    tmp = n % 10;
    num.push_back(tmp);
    if (tmp > k) k = tmp;
    n /= 10;
  }
  cout << k << endl;
  bool flag = true;
  bool main = true;
  while (true) {
    flag = false;
    main = false;
    for (int i = num.size() - 1; i > -1; i--) {
      if (num[i] > 0) {
        cout << 1;
        flag = true;
        main = true;
        num[i]--;
      } else if ((num[i] == 0) && (main))
        cout << 0;
    }
    if (flag == false) break;
    cout << " ";
  }
  return 0;
}
