#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
const int MOD = 1000000007;
string s;
int n, cnt = 0, cur = 0;
vector<int> res[N];
bool check() {
  for (int i = 1; i <= cnt; i++) {
    int x = res[i].size() - 1;
    if (s[res[i][x]] == '1') return 0;
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  int n = s.size();
  s = ' ' + s;
  for (int i = 1; i <= n; i++) {
    if (s[i] == '0') {
      if (cur == 0) {
        res[++cnt].push_back(i);
      } else {
        res[cur].push_back(i);
        cur--;
      }
    } else {
      cur++;
      if (cur > cnt) {
        cout << -1;
        return 0;
      }
      res[cur].push_back(i);
    }
  }
  if (!check())
    cout << -1;
  else {
    cout << cnt << "\n";
    for (int i = 1; i <= cnt; i++) {
      cout << res[i].size() << " ";
      for (int x : res[i]) cout << x << " ";
      cout << "\n";
    }
  }
  return 0;
}
