#include <bits/stdc++.h>
using namespace std;
vector<int> ans;
char i[10], tmp[10];
int main() {
  scanf("%s", i);
  while (1) {
    for (int c = 0; i[c]; c++) {
      if (i[c] > '0')
        i[c]--, tmp[c] = '1';
      else
        tmp[c] = '0';
    }
    int rem;
    sscanf(tmp, "%d", &rem);
    if (rem == 0) break;
    ans.push_back(rem);
  }
  printf("%d\n", ans.size());
  for (int c = 0; c < ans.size(); c++) printf("%d ", ans[c]);
  printf("\n");
}
