#include <bits/stdc++.h>
using namespace std;
int di[8] = {1, -1, 0, 0, 1, 1, -1, -1};
int dj[8] = {0, 0, 1, -1, 1, -1, 1, -1};
const int N = 2e5 + 5, MOD = 998244353;
const double PI = 3.141592653589793238;
int n, i, j, sum;
vector<int> v;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  while (n) {
    int num = 0, mul = 1, m = n;
    while (m) {
      num += (m % 10 >= 1) * mul;
      mul *= 10, m /= 10;
    }
    n -= num;
    v.push_back(num);
  }
  cout << v.size() << endl;
  for (auto x : v) cout << x << " ";
  return 0;
}
