111111
 100009
 10011
 1000000
 8
 10201
 102030
 908172
 123456
 415
 900000
 21
 909090
 314159
 999999
 909823
 987654
 1453
 1435
 98
 10
 2
 1

1
111111
 9
100001 1 1 1 1 1 1 1 1
 1
10011
 1
1000000
 8
1 1 1 1 1 1 1 1
 2
10101 100
 3
101010 1010 10
 9
101111 101011 101010 101010 101010 101010 101010 101000 100000
 6
111111 11111 1111 111 11 1
 5
111 101 101 101 1
 9
100000 100000 100000 100000 100000 100000 100000 100000 100000
 2
11 10
 9
101010 101010 101010 101010 101010 101010 101010 101010 101010
 9
111111 101011 101011 1011 11 1 1 1 1
 9
111111 111111 111111 111111 111111 111111 111111 111111 111111
 9
101111 101111 101101 101100 101100 101100 101100 101100 101000
 9
111111 111111 111111 111111 111110 111100 111000 110000 100000
 5
1111 111 111 110 10
 5
1111 111 111 101 1
 9
11 11 11 11 11 11 11 11 10
 1
10
 2
1 1
 1
1

#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();
  }
}
void main_() {
  int n;
  scanf("%d", &n);
  vector<string> ans;
  while (n) {
    string cur;
    int temp = n;
    vector<int> arr;
    while (temp) {
      int dig = temp % 10;
      arr.push_back(dig);
      temp /= 10;
    }
    n = 0;
    reverse(arr.begin(), arr.end());
    if (arr.size())
      for (int i = 0; i <= arr.size() - 1; i++) {
        if (arr[i]) {
          cur.insert(cur.begin(), '1');
          arr[i]--;
        } else {
          if (cur.size()) cur.insert(cur.begin(), '0');
        }
        n = n * 10 + arr[i];
      }
    reverse(cur.begin(), cur.end());
    ans.push_back(cur);
  }
  cout << ans.size() << endl;
  for (int i = 0; i <= ans.size() - 1; i++) cout << ans[i] << " ";
  cout << endl;
}
int main() {
  { main_(); }
  return 0;
}
