#include <bits/stdc++.h>
using namespace std;
string s;
vector<vector<long long>> rs;
deque<long long> zeros, ones;
bool can = true;
void addZero(long long i) {
  if (ones.empty()) {
    rs.push_back({i});
    zeros.push_back((long long)rs.size() - 1);
  } else {
    long long p = ones.front();
    ones.pop_front();
    rs[p].push_back(i);
    zeros.push_back(p);
  }
}
void addOne(long long i) {
  if (zeros.empty()) {
    can = false;
    return;
  } else {
    long long p = zeros.front();
    zeros.pop_front();
    rs[p].push_back(i);
    ones.push_back(p);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cout.setf(ios::fixed);
  cout.precision(20);
  cout.tie(nullptr);
  cin.tie(nullptr);
  cin >> s;
  for (__typeof((long long)s.size()) i = (0) - ((0) > ((long long)s.size()));
       i != ((long long)s.size()) - ((0) > ((long long)s.size()));
       i += 1 - 2 * ((0) > ((long long)s.size()))) {
    if (s[i] == '0') {
      addZero(i);
    } else {
      addOne(i);
    }
    if (!can) {
      cout << -1;
      return 0;
    }
  }
  if (ones.size()) {
    cout << -1;
    return 0;
  }
  cout << rs.size() << endl;
  for (auto v : rs) {
    cout << v.size() << ' ';
    for (auto x : v) {
      cout << x + 1 << ' ';
    }
    cout << endl;
  }
  return 0;
}
