#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> vec;
  while (n) {
    int x = n;
    int p = 1;
    int m = 0;
    while (x) {
      if (x % 10 != 0) m += p;
      x /= 10;
      p *= 10;
    }
    vec.push_back(m);
    n -= m;
  }
  cout << vec.size() << endl;
  for (auto y : vec) {
    cout << y << " ";
  }
  return 0;
}
