#include <bits/stdc++.h>
using namespace std;
int mat[10][7];
int main() {
  int n;
  cin >> n;
  int maxi = -1;
  int temp = n;
  int dig = 0;
  while (n) {
    dig++;
    n /= 10;
  }
  int colm = dig;
  n = temp;
  while (n) {
    int x = n % 10;
    if (x > maxi) maxi = x;
    for (int i = 0; i < x; i++) mat[i][colm] = 1;
    colm--;
    n /= 10;
  }
  vector<int> v;
  for (int i = 0; i < maxi; i++) {
    int ans = 0;
    for (int j = 0; j <= dig; j++) {
      ans = ans * 10;
      ans += mat[i][j];
    }
    v.push_back(ans);
  }
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
  return 0;
}
