#include <bits/stdc++.h>
using namespace std;
int p[10];
int pw[10];
int main() {
  int n;
  cin >> n;
  int k = n;
  int t = 0;
  while (k) {
    p[t] = k % 10;
    k /= 10;
    ++t;
  }
  pw[0] = 1;
  for (int i = 1; i < 10; ++i) {
    pw[i] = pw[i - 1] * 10;
  }
  vector<int> ans;
  for (int i = 9; i > -1; --i) {
    for (int j = 0; j < p[i]; ++j) {
      int curr = pw[i];
      for (int j = i - 1; j > -1; --j) {
        if (!p[j]) continue;
        curr += pw[j];
        --p[j];
      }
      if (curr) {
        ans.push_back(curr);
      }
    }
  }
  cout << ans.size() << endl;
  for (int j = 0; j < ans.size(); ++j) {
    cout << ans[j] << " ";
  }
  return 0;
}
