#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double pi = acos(-1.0);
template <class T>
int chkmin(T &a, T b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
int chkmax(T &a, T b) {
  return a < b ? a = b, 1 : 0;
}
template <class T>
T sqr(T a) {
  return a * a;
}
template <class T>
T mmin(T a, T b) {
  return a < b ? a : b;
}
template <class T>
T mmax(T a, T b) {
  return a > b ? a : b;
}
template <class T>
T aabs(T a) {
  return a < 0 ? -a : a;
}
template <class T>
int dcmp(T a, T b) {
  return a > b;
}
template <int *a>
int cmp_a(int first, int second) {
  return a[first] < a[second];
}
namespace io {
const int SIZE = (1 << 21) + 1;
char ibuf[SIZE], *iS, *iT, obuf[SIZE], *oS = obuf, *oT = oS + SIZE - 1, c,
                                       qu[55];
int f, qr;
inline void flush() {
  fwrite(obuf, 1, oS - obuf, stdout);
  oS = obuf;
}
inline void putc(char first) {
  *oS++ = first;
  if (oS == oT) flush();
}
inline void read(int &first) {
  for (f = 1, c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                              (iS == iT ? EOF : *iS++))
                            : *iS++);
       c < '0' || c > '9';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    if (c == '-') f = -1;
  for (first = 0; c <= '9' && c >= '0';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    first = first * 10 + (c & 15);
  first *= f;
}
inline void read(char &first) {
  first = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                    : *iS++);
}
inline void read(char *first) {
  while ((*first = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                                (iS == iT ? EOF : *iS++))
                             : *iS++)) == '\n' ||
         *first == ' ' || *first == '\r')
    ;
  while (!(*first == '\n' || *first == ' ' || *first == '\r'))
    *(++first) = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                              (iS == iT ? EOF : *iS++))
                           : *iS++);
  *first = 0;
}
template <typename A, typename... B>
inline void read(A &first, B &...second) {
  read(first);
  read(second...);
}
inline void write(int first) {
  if (!first) putc('0');
  if (first < 0) putc('-'), first = -first;
  while (first) qu[++qr] = first % 10 + '0', first /= 10;
  while (qr) putc(qu[qr--]);
}
inline void write(char first) { putc(first); }
inline void write(const char *first) {
  while (*first) {
    putc(*first);
    ++first;
  }
}
inline void write(char *first) {
  while (*first) {
    putc(*first);
    ++first;
  }
}
template <typename A, typename... B>
inline void write(A first, B... second) {
  write(first);
  write(second...);
}
struct Flusher_ {
  ~Flusher_() { flush(); }
} io_flusher_;
}  // namespace io
using io ::putc;
using io ::read;
using io ::write;
char mxs[1023], mns[1023];
char s1[1023], s2[1023], s3[1023], s4[1023];
int mnf[1023], mxf[1023], f1[1023], f2[1023];
int main() {
  int n;
  read(mxs + 1);
  n = strlen(mxs + 1);
  for (int i = 1; i <= n; ++i) mns[i] = mxs[i];
  for (int i = 2; i <= n; ++i) {
    for (int j = 1; j <= i; ++j) {
      s1[j] = mns[j];
      s2[i - j + 1] = mxs[j];
      s3[j] = mxs[j];
      s4[i - j + 1] = mns[j];
      f1[j] = mnf[j];
      f2[j] = mxf[j];
    }
    s1[i + 1] = s2[i + 1] = s3[i + 1] = s4[i + 1] = 0;
    if (strcmp(s1 + 1, s2 + 1) <= 0) {
      for (int j = 1; j <= i; ++j) mns[j] = s1[j];
    } else {
      for (int j = 1; j <= i; ++j) {
        mns[j] = s2[j];
        mnf[j] = f2[j];
      }
      mnf[i] = 1;
    }
    if (strcmp(s3 + 1, s4 + 1) >= 0) {
      for (int j = 1; j <= i; ++j) mxs[j] = s3[j];
    } else {
      for (int j = 1; j <= i; ++j) {
        mxs[j] = s4[j];
        mxf[j] = f1[j];
      }
      mxf[i] = 1;
    }
  }
  for (int i = 1; i <= n; ++i) printf("%d%c", mnf[i], i == n ? '\n' : ' ');
  return 0;
}
