#include <bits/stdc++.h>
using namespace std;
void solve();
void file_i_o() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
long long int g[10], t;
int main(int argc, char const *argv[]) {
  clock_t begin = clock();
  file_i_o();
  solve();
  return 0;
}
void solve() {
  long long int n;
  cin >> n;
  t = 1;
  long long int maxi = 0;
  while (n) {
    long long int b = n % 10;
    maxi = max(maxi, b);
    for (long long int i = 9; i > 9 - b; i--) g[i] += t;
    t *= 10;
    n /= 10;
  }
  cout << maxi << "\n";
  for (long long int i = 0; i < 10; i++)
    if (g[i]) cout << g[i] << ' ';
}
