#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7, MAXN = 1e6 + 10, INF = 1e18;
long long n, ans[10], a = 1, ans1;
int main() {
  cin >> n;
  while (n) {
    for (long long i = 0; i < n % 10; i++) {
      ans[i] += a;
    }
    n /= 10;
    a *= 10;
  }
  for (long long i = 0; i < 10; i++) {
    if (ans[i] != 0) ans1++;
  }
  cout << ans1 << '\n';
  for (long long i = 0; i < ans1; i++) {
    cout << ans[i] << ' ';
  }
  return 0;
}
