#include <bits/stdc++.h>
using namespace std;
int temp[10] = {0};
int cnt = 0;
int cal(int n) {
  int ans = 0;
  while (n) {
    ans = max(ans, n % 10);
    temp[++cnt] = n % 10;
    n /= 10;
  }
  return ans;
}
int main() {
  int n;
  cin >> n;
  cout << (n = cal(n)) << endl;
  for (int i = 1; i <= n; i++) {
    int cur = 0;
    for (int i = cnt; i >= 1; i--) {
      if (temp[i]) {
        cur += 1;
        temp[i]--;
      }
      cur *= 10;
    }
    cout << cur / 10 << ' ';
  }
  return 0;
}
