#include <bits/stdc++.h>
const long long int MOD = 1000000007ll;
using namespace std;
int main() {
  std::ios_base::sync_with_stdio(false);
  int ar[9][6] = {};
  int n, h = 0;
  cin >> n;
  if (n == 1000000) {
    cout << "1\n1000000";
    return 0;
  }
  while (n > 0) {
    int c = n % 10;
    n = n / 10;
    for (int i = 0; i < c; i++) {
      ar[i][h] = 1;
    }
    h++;
  }
  int num[9] = {};
  for (int i = 0; i < 9; i++) {
    num[i] += ar[i][5] * 100000;
    num[i] += ar[i][4] * 10000;
    num[i] += ar[i][3] * 1000;
    num[i] += ar[i][2] * 100;
    num[i] += ar[i][1] * 10;
    num[i] += ar[i][0] * 1;
  }
  int count = 0;
  for (int i = 0; i < 9; i++) {
    if (num[i] > 0) {
      count++;
    }
  }
  cout << count << endl;
  for (int i = 8; i >= 0; i--) {
    if (num[i] > 0) {
      cout << num[i] << " ";
    }
  }
  return 0;
}
