#include <bits/stdc++.h>
using namespace std;
const int64_t MOD = 1e9 + 7;
const int64_t base = 31;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int64_t n;
  cin >> n;
  vector<int64_t> ans;
  while (n > 0) {
    int64_t nn = n, t = 0, pow = 1;
    while (nn) {
      if (nn % 10) t += pow;
      nn /= 10;
      pow *= 10;
    }
    n -= t;
    ans.push_back(t);
  }
  cout << ans.size() << endl;
  sort(ans.begin(), ans.end());
  for (int64_t i : ans) cout << i << " ";
  return 0;
}
