#include <bits/stdc++.h>
using namespace std;
template <typename T>
T prod(const T &a, const T &b) {
  return ((a % ((long long int)1e9 + 7)) * (b % ((long long int)1e9 + 7))) %
         ((long long int)1e9 + 7);
}
template <typename T>
T pow_(const T &a, const T &b) {
  if (!b) return 1;
  long long int p = pow_(a, b / 2);
  p *= p;
  return (b % 2) ? (p * a) : p;
}
template <typename T>
T modpow(const T &a, const T &b) {
  if (!b) return 1;
  long long int p = modpow(a, b / 2);
  p = prod(p, p);
  return (b % 2) ? (prod(p, a)) : p;
}
template <typename T>
T gcd(const T &a, const T &b) {
  if (!b) return a;
  return gcd(b, a % b);
}
template <typename T>
T lcm(const T &a, const T &b) {
  return (a * b) / gcd(a, b);
}
template <typename T>
T max(const T &a, const T &b, const T &c) {
  return max(a, max(b, c));
}
template <typename T>
T min(const T &a, const T &b, const T &c) {
  return min(a, min(b, c));
}
template <typename T>
void dbg(const vector<T> &a, int l, int r) {
  for (int i = l; i <= r; i++) cout << a[i] << " ";
  cout << endl;
}
template <typename T>
void dbg(const vector<T> &a) {
  for (int i = 0; i <= a.size() - 1; i++) cout << a[i] << " ";
  cout << endl;
}
void dbg(priority_queue<int, vector<int>, greater<int> > q) {
  while (!q.empty()) {
    cout << q.top() << endl;
    q.pop();
  }
}
int to_num(string a) {
  int n = a.size();
  int ret = 0;
  for (int i = 0; i <= n - 1; i++) ret = ret * 10 + a[i] - '0';
  return ret;
}
void main_() {
  string s;
  cin >> s;
  int ma = 0;
  for (int i = 0; i <= s.size() - 1; i++) ma = max(ma, s[i] - '0');
  cout << ma << endl;
  for (int i = 0; i <= ma - 1; i++) {
    string ans;
    for (int j = 0; j <= s.size() - 1; j++) {
      if (i < s[j] - '0')
        ans.insert(ans.begin(), '1');
      else
        ans.insert(ans.begin(), '0');
    }
    reverse(ans.begin(), ans.end());
    cout << to_num(ans) << " ";
  }
  cout << endl;
}
int main() {
  { main_(); }
  return 0;
}
