#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  int n = str.length();
  int cnt = 0;
  vector<string> res(9, string(n, '0'));
  for (int i = 0; i < n; i++) {
    int cur = str[i] - '0';
    cnt = max(cnt, cur);
    for (int j = 0; j < cur; j++) {
      res[j][i] = '1';
    }
  }
  cout << cnt << endl;
  for (int i = 0; i < cnt; i++) {
    bool was = false;
    for (int j = 0; j < n; j++) {
      was |= (res[i][j] == '1');
      if (was) {
        cout << res[i][j];
      }
    }
    cout << " ";
  }
}
