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;
bool isvowel(char c) {
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'A' ||
      c == 'E' || c == 'I' || c == 'O' || c == 'U')
    return true;
  return false;
}
bool prime[5000001];
int spf[5000001];
vector<int> primes;
void sieve() {
  memset(prime, true, sizeof(prime));
  for (int p = 2; p * p <= 5000000; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= 5000000; i += p) {
        prime[i] = false;
        if (spf[i] == 0) spf[i] = p;
      }
    }
  }
  for (int p = 2; p <= 5000000; p++)
    if (prime[p]) primes.push_back(p);
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int fast_exp(long long int x, long long int n) {
  long long int ans = 1;
  while (n) {
    if (n & 1) ans *= x;
    n = n >> 1;
    x = x * x;
  }
  return ans;
}
long long int mod_exp(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int pre_or[2000005], suf_or[200005];
vector<int> adj[200005];
long long int dp[200005], ones[41], zeroes[41];
void solve() {
  long long int n;
  cin >> n;
  vector<long long int> ans;
  while (n) {
    long long int N = n, c = 0, i = 1;
    while (N) {
      long long int r = N % 10;
      if (r) {
        c += i;
      }
      i *= 10;
      N /= 10;
    }
    n -= c;
    ans.push_back(c);
  }
  cout << ans.size() << '\n';
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  ;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t = 1;
  while (t--) {
    solve();
    cout << '\n';
  }
}
