#include <bits/stdc++.h>
using namespace std;
const long long M = 18;
const long long INF = 1e9;
const long long N = 2e5 + 1;
const long long mod = 1e9 + 7;
const long double eps = 1E-7;
string s;
int k, x, y;
set<int> a, b;
vector<int> g[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '1')
      a.insert(i + 1);
    else
      b.insert(i + 1);
  }
  while (!b.empty()) {
    k++;
    x = *b.begin();
    g[k].push_back(x);
    b.erase(b.begin());
    while (!a.empty() && !b.empty()) {
      y = 0;
      auto it = a.upper_bound(x);
      if (it != a.end()) {
        x = *it;
        auto pt = b.upper_bound(x);
        if (pt != b.end()) y = *pt;
      }
      if (!y) break;
      a.erase(x);
      b.erase(y);
      g[k].push_back(x);
      g[k].push_back(y);
      x = y;
    }
  }
  if (!a.empty()) {
    cout << -1;
    return 0;
  }
  cout << k << endl;
  for (int i = 1; i <= k; i++) {
    cout << g[i].size() << " ";
    for (int j = 0; j < g[i].size(); j++) cout << g[i][j] << " ";
    cout << endl;
  }
}
