#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string n;
  cin >> n;
  int dig = n.length();
  int arr[9][dig];
  for (int i = 0; i <= 8; i++)
    for (int j = 0; j <= dig - 1; j++) arr[i][j] = 0;
  for (int i = 0; i <= dig - 1; i++) {
    int k = n.at(i) - '0';
    for (int j = 0; j <= k - 1; j++) {
      arr[j][i] = 1;
    }
  }
  vector<long long> quas;
  for (int i = 0; i <= 8; i++) {
    long long num = 0;
    for (int j = 0; j <= dig - 1; j++) {
      num *= 10;
      num += arr[i][j];
    }
    if (num != 0) quas.push_back(num);
  }
  cout << quas.size() << endl;
  for (int i = 0; i <= quas.size() - 1; i++) {
    cout << quas[i] << " ";
  }
  cout << endl;
  return 0;
}
