#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 1e9;
const int N = 1e5 + 10;
long long fast_exp(int base, int exp) {
  long long res = 1;
  while (exp > 0) {
    if (exp % 2 == 1) res = (res * base) % MOD;
    base = (base * base) % MOD;
    exp /= 2;
  }
  return res % MOD;
}
int main() {
  int N;
  cin >> N;
  int n = N;
  vector<int> res;
  while (N) {
    int m = 0, p = 1, n = N;
    while (n) {
      if (n % 10) m += p;
      n = n / 10;
      p *= 10;
    }
    res.push_back(m);
    N -= m;
  }
  cout << res.size() << endl;
  for (auto ch : res) cout << ch << " ";
  cout << endl;
  return 0;
}
