#include <bits/stdc++.h>
long long const INF = 2e18;
int const MOD = 1000000007;
int const MAXN = 200010;
using namespace std;
int n, pos;
string s;
queue<int> q1, q0;
vector<int> v[MAXN];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> s;
  n = s.length();
  for (int i = 0; i < n; i++) {
    if (s[i] == '0') {
      if (!q1.size()) {
        v[pos].push_back(i);
        q0.push(pos);
        pos++;
      } else {
        int nom = q1.front();
        q1.pop();
        v[nom].push_back(i);
        q0.push(nom);
      }
    } else {
      if (!q0.size()) {
        cout << -1;
        return 0;
      } else {
        int nom = q0.front();
        q0.pop();
        v[nom].push_back(i);
        q1.push(nom);
      }
    }
  }
  if (q1.size()) {
    cout << -1;
    return 0;
  }
  cout << pos << endl;
  for (int i = 0; i < pos; i++) {
    cout << v[i].size() << " ";
    for (int j = 0; j < v[i].size(); j++) cout << v[i][j] + 1 << " ";
    cout << endl;
  }
  return 0;
}
