#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const int mod = inf + 7;
const double eps = 1e-9;
const double pi = acos(-1.0);
long long read_long() {
  long long ans = 0;
  char c;
  bool started = false;
  bool is_negative = false;
  while (true) {
    c = getchar();
    if ((c < '0' || c > '9') && c != '-' && !started) continue;
    if ((c < '0' || c > '9') && c != '-' && started) break;
    if (started) {
      ans = ans * 10;
    }
    started = true;
    if (c == '-')
      is_negative = true;
    else
      ans += c - '0';
  }
  if (is_negative) ans *= -1;
  return ans;
}
char tmp[200200];
vector<vector<int> > ans;
deque<int> ones;
string second;
int n;
int main() {
  scanf("%s", tmp);
  second = tmp;
  n = (int)second.size();
  set<pair<int, int> > st;
  for (int i = 0; i < n; i++) {
    if (second[i] == '0') {
      if (ans.empty()) {
        vector<int> t;
        t.push_back(i + 1);
        ans.push_back(t);
        st.insert(make_pair(i + 1, (int)ans.size() - 1));
      } else if (ones.size() > 0) {
        int x = ones.front();
        ones.pop_front();
        if ((*st.begin()).first > x) {
          ones.push_front(x);
          vector<int> t;
          t.push_back(i + 1);
          ans.push_back(t);
          st.insert(make_pair(i + 1, (int)ans.size() - 1));
        } else {
          __typeof(st.begin()) it = st.lower_bound(make_pair(x, -1));
          it--;
          int best = (*it).second;
          st.erase(make_pair(ans[best].back(), best));
          ans[best].push_back(x);
          ans[best].push_back(i + 1);
          st.insert(make_pair(i + 1, best));
        }
      } else {
        vector<int> t;
        t.push_back(i + 1);
        ans.push_back(t);
        st.insert(make_pair(i + 1, (int)ans.size() - 1));
      }
    } else {
      ones.push_back(i + 1);
    }
  }
  if (ones.size() > 0)
    printf("-1\n");
  else {
    printf("%d\n", (int)ans.size());
    for (__typeof(ans.begin()) it = ans.begin(); it != ans.end(); it++) {
      vector<int> v = *it;
      printf("%d", (int)v.size());
      for (__typeof(v.begin()) it2 = v.begin(); it2 != v.end(); it2++)
        printf(" %d", *it2);
      printf("\n");
    }
  }
  return 0;
}
