#include <bits/stdc++.h>
using namespace std;
int strip(int n) {
  vector<int> digits;
  int result = 0;
  int place = 1;
  while (n > 0) {
    if (n % 10) result += place;
    n /= 10;
    place *= 10;
  }
  return result;
}
int main() {
  ios_base::sync_with_stdio(false);
  cout << setprecision(12);
  int n;
  cin >> n;
  ;
  vector<int> repr;
  while (n > 0) {
    int r = strip(n);
    repr.push_back(r);
    n -= r;
  }
  cout << repr.size() << endl;
  for (int r : repr) cout << r << " ";
  cout << endl;
}
