#include <bits/stdc++.h>
using namespace std;
multimap<int, string> MM;
long long int BinSearch(long long int a[], vector<long long int>& tVec,
                        long long int x, long long int y, long long int v) {
  while (y > x + 1) {
    long long int m = x + (y - x) / 2;
    if (a[tVec[m]] >= v)
      y = m;
    else
      x = m;
  }
  return y;
}
const int M = 1e9 + 7;
long long mod(long long x) { return ((x % M + M) % M); }
long long add(long long a, long long b) { return mod(mod(a) + mod(b)); }
long long mul(long long a, long long b) { return mod(mod(a) * mod(b)); }
long long int Mod = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, i;
  cin >> n;
  vector<long long int> res;
  while (n > 0) {
    long long int num = n, m = 0, p = 1;
    while (num > 0) {
      if (num % 10 > 0) m = m + p;
      p = p * 10;
      num = num / 10;
    }
    res.push_back(m);
    n = n - m;
  }
  cout << res.size() << "\n";
  for (i = 0; i < res.size(); i++) cout << res[i] << " ";
  return 0;
}
