#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const double EPS = 1e-9;
int mods(long long a, long long b) { return (b + (a % b)) % b; }
string s;
queue<int> zero, one;
vector<vector<int> > subsequences;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '0') {
      if (!one.empty()) {
        subsequences[one.front()].push_back(i + 1);
        zero.push(one.front());
        one.pop();
      } else {
        subsequences.push_back(vector<int>());
        subsequences.back().push_back(i + 1);
        zero.push(subsequences.size() - 1);
      }
    } else if (s[i] == '1') {
      if (!zero.empty()) {
        subsequences[zero.front()].push_back(i + 1);
        one.push(zero.front());
        zero.pop();
      } else {
        cout << "-1\n";
        return 0;
      }
    }
  }
  if (!one.empty()) {
    cout << "-1\n";
    return 0;
  }
  cout << subsequences.size() << '\n';
  for (int i = 0; i < subsequences.size(); i++) {
    cout << subsequences[i].size();
    for (int j = 0; j < subsequences[i].size(); j++) {
      cout << " " << subsequences[i][j];
    }
    cout << '\n';
  }
  return 0;
}
