#include <bits/stdc++.h>
const long long N = 1000006;
using namespace std;
const long long MOD = 1000000007LL;
template <typename T>
T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
template <typename T>
T power(T x, T y, long long m = MOD) {
  T ans = 1;
  while (y > 0) {
    if (y & 1LL) ans = (ans * x) % m;
    y >>= 1LL;
    x = (x * x) % m;
  }
  return ans % m;
}
long long F, id[N];
vector<long long> ans[N];
int32_t main() {
  string s;
  cin >> s;
  priority_queue<pair<long long, long long> > q;
  multiset<long long> s0, s1;
  long long n = s.size();
  for (long long(i) = (0); i < (n); i++) {
    if (s[i] == '0') {
      if (!s1.empty()) {
        auto bot = *s1.begin();
        id[i] = bot;
        ans[bot].emplace_back(i + 1);
        s1.erase(s1.begin());
        s0.insert(bot);
      } else {
        id[i] = F;
        ans[F].emplace_back(i + 1);
        s0.insert(F++);
      }
    } else {
      if (!s0.empty()) {
        auto bot = *s0.begin();
        id[i] = bot;
        ans[bot].emplace_back(i + 1);
        s0.erase(s0.begin());
        s1.insert(bot);
      } else {
        cout << "-1";
        return 0;
      }
    }
  }
  if (!s1.empty()) {
    cout << "-1";
    return 0;
  }
  cout << F << '\n';
  for (long long(i) = (0); i < (F); i++) {
    cout << ans[i].size() << " ";
    for (auto x : ans[i]) cout << x << " ";
    cout << '\n';
  }
}
