#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  vector<int> v;
  for (int i = 0; i < s.length(); ++i) v.push_back(s[i] - '0');
  vector<string> ans;
  while (1) {
    string tmp;
    bool ok = true;
    int i;
    for (i = 0; i < s.length(); ++i)
      if (v[i]) {
        ok = false;
        break;
      }
    for (; i < s.length(); ++i) {
      if (v[i]) {
        --v[i];
        tmp.push_back('1');
      } else
        tmp.push_back('0');
    }
    if (ok)
      break;
    else
      ans.push_back(tmp);
  }
  cout << ans.size() << '\n';
  for (auto it : ans) cout << it << " ";
}
