#include <bits/stdc++.h>
using namespace std;
int dp[100][100];
int main() {
  int i, j;
  memset(dp, 0, sizeof(dp));
  int temp, n, dig = 0, max;
  cin >> n;
  temp = n;
  if (temp == 0) dig = 1;
  while (temp) {
    ++dig;
    temp /= 10;
  }
  max = -1;
  for (i = dig; i >= 1; --i) {
    temp = n % 10;
    if (temp > max) max = temp;
    for (j = 1; j <= temp; ++j) {
      dp[j][i] = 1;
    }
    n /= 10;
  }
  cout << max << endl;
  for (i = 1; i <= max; ++i) {
    j = 1;
    while (dp[i][j] != 1 && j <= dig) {
      ++j;
    }
    while (j <= dig) {
      cout << dp[i][j];
      ++j;
    }
    cout << " ";
  }
}
