#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 1e6 + 200;
int ary[10], b[10], len = 0;
queue<int> Q;
bool istrue() {
  for (int i = 0; i < len; i++)
    if (b[i]) return true;
  return false;
}
int main() {
  int n, cnt = 0;
  cin >> n;
  while (n) {
    ary[len++] = n % 10;
    n /= 10;
  }
  for (int i = 0; i < len; i++) b[len - i - 1] = ary[i];
  while (istrue()) {
    int ans = 0;
    for (int i = 0; i < len; i++)
      if (b[i]) {
        b[i]--;
        ans = ans * 10 + 1;
      } else
        ans = ans * 10;
    cnt++;
    Q.push(ans);
  }
  int flag = 1;
  cout << cnt << endl;
  while (Q.size()) {
    if (flag == 1) {
      printf("%d", Q.front());
      flag = 0;
    } else
      printf(" %d", Q.front());
    Q.pop();
  }
  puts("");
  return 0;
}
