#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
const int mod = 1e9 + 7;
const int maxn = 2e5 + 7;
int n, m, k, ct[2];
vector<int> vc[2];
vector<int> ans[maxn];
string s;
bool vis[maxn];
void sol() {
  int cnt = 0;
  queue<int> q[2];
  for (int i = 0; i < s.length(); i++) {
    int v = s[i] - '0';
    if (v == 1) {
      if (q[0].empty()) {
        cout << -1 << endl;
        return;
      } else {
        int p = q[0].front();
        q[0].pop();
        q[1].push(p);
        ans[p].push_back(i + 1);
      }
    } else {
      if (!q[1].empty()) {
        int p = q[1].front();
        q[1].pop();
        q[0].push(p);
        ans[p].push_back(i + 1);
      } else {
        q[0].push(cnt);
        ans[cnt++].push_back(i + 1);
      }
    }
  }
  for (int i = 0; i < cnt; i++) {
    if (s[ans[i].back() - 1] == '1') {
      cout << -1 << endl;
      return;
    }
  }
  cout << cnt << endl;
  for (int i = 0; i < cnt; i++) {
    cout << ans[i].size();
    for (auto v : ans[i]) cout << " " << v;
    cout << endl;
  }
}
int main() {
  std::ios::sync_with_stdio(false);
  while (cin >> s) {
    ct[0] = ct[1] = 0;
    vc[0].clear();
    vc[1].clear();
    for (int i = 0; i < s.length(); i++) ct[s[i] - '0']++;
    if (ct[0] <= ct[1])
      cout << -1 << endl;
    else
      sol();
  }
  return 0;
}
