#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int N;
  cin >> N;
  vector<int> a;
  while (N) {
    int n = N, m = 0, p = 1;
    while (n) {
      if (n % 10) m += p;
      n /= 10;
      p *= 10;
    }
    a.push_back(m);
    N -= m;
  }
  cout << a.size() << '\n';
  sort(a.begin(), a.end());
  for (int x : a) cout << x << ' ';
  cout << '\n';
  return 0;
}
