#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
string s;
vector<int> v[N];
int a, sum;
int main() {
  cin >> s;
  for (int i = 0; i < s.size(); i++)
    if (s[i] == '0')
      if (a == 0)
        v[++sum].push_back(i);
      else
        v[a--].push_back(i);
    else if (a == sum) {
      cout << -1 << endl;
      return 0;
    } else
      v[++a].push_back(i);
  if (a != 0) {
    cout << -1 << endl;
    return 0;
  }
  cout << sum << endl;
  for (int i = 1; i <= sum; i++) {
    cout << v[i].size() << " ";
    for (int j = 0; j < v[i].size(); j++) cout << v[i][j] + 1 << " ";
    cout << endl;
  }
  return 0;
}
