#include <bits/stdc++.h>
using namespace std;
vector<long long int> v;
int main() {
  ios_base::sync_with_stdio(0);
  ;
  long long int n;
  cin >> n;
  while (n) {
    long long int x = n, p = 1, m = 0;
    while (x) {
      if (x % 10) m += p;
      x /= 10;
      p *= 10;
    }
    v.push_back(m);
    n -= m;
  }
  sort(v.begin(), v.end());
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
  return 0;
}
