#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, temp, ma = 0;
  cin >> x;
  temp = x;
  while (x) {
    ma = max(ma, x % 10);
    x /= 10;
  }
  x = temp;
  cout << ma << endl;
  while (x) {
    temp = 0;
    ma = 1;
    while (ma <= x) {
      if (x / ma % 10) temp += ma;
      ma *= 10;
    }
    x -= temp;
    cout << temp << ' ';
  }
  return 0;
}
