#include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000009;
int main() {
  string s;
  cin >> s;
  string ans[100];
  int maxx = 0;
  for (int i = 0; i < s.size(); i++)
    if (maxx < s[i] - '0') maxx = s[i] - '0';
  for (int i = 1; i <= maxx; i++) {
    for (int j = 0; j < s.size(); j++)
      if (s[j] - '0' >= 1) {
        ans[i] += '1';
        s[j] = (s[j] - '0' - 1) + '0';
      } else
        ans[i] += '0';
  }
  cout << maxx << endl;
  for (int i = 1; i <= maxx; i++) {
    bool b = false;
    for (int j = 0; j < ans[i].size(); j++)
      if (ans[i][j] == '0' && b != false)
        cout << ans[i][j];
      else if (ans[i][j] == '1') {
        cout << ans[i][j];
        b = true;
      }
    cout << " ";
  }
  return 0;
}
