#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  char mx = '0';
  for (auto k : s) mx = max(k, mx);
  long long int n = mx - 48, m = (int)s.size();
  bool ans[n][m];
  for (long long int i = 0; i < n; i++)
    for (long long int j = 0; j < m; j++) ans[i][j] = 0;
  for (long long int i = 0; i < (int)s.size(); i++) {
    long long int x = (int)s[i] - 48;
    for (long long int j = 0; j < x; j++) {
      ans[j][i] = 1;
    }
  }
  cout << n << "\n";
  for (long long int i = 0; i < n; i++) {
    bool one = false;
    for (long long int j = 0; j < m; j++) {
      if (ans[i][j] == 1) one = true;
      if (one) {
        if (ans[i][j])
          cout << 1;
        else
          cout << 0;
      }
    }
    cout << " ";
  }
  return 0;
}
