#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
template <typename T>
bool mmax(T &m, const T q) {
  if (m < q) {
    m = q;
    return true;
  } else
    return false;
}
template <typename T>
bool mmin(T &m, const T q) {
  if (m > q) {
    m = q;
    return true;
  } else
    return false;
}
void __print(long long first) { cerr << first; }
void __print(long first) { cerr << first; }
void __print(unsigned first) { cerr << first; }
void __print(unsigned long first) { cerr << first; }
void __print(unsigned long long first) { cerr << first; }
void __print(float first) { cerr << first; }
void __print(double first) { cerr << first; }
void __print(long double first) { cerr << first; }
void __print(char first) { cerr << '\'' << first << '\''; }
void __print(const char *first) { cerr << '\"' << first << '\"'; }
void __print(const string &first) { cerr << '\"' << first << '\"'; }
void __print(bool first) { cerr << (first ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &first) {
  cerr << '{';
  __print(first.first);
  cerr << ',';
  __print(first.second);
  cerr << '}';
}
template <typename T>
void __print(const T &first) {
  long long f = 0;
  cerr << '{';
  for (auto &i : first) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
mt19937_64 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
const long long N = 1 << 20;
void fail() {
  cout << -1;
  exit(0);
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(12);
  string ss;
  cin >> ss;
  unsigned long long n = ss.size();
  set<unsigned long long> s, o;
  for (unsigned long long i = 0; i < n; i++) {
    if (ss[i] == '1')
      o.insert(i);
    else
      s.insert(i);
  }
  vector<vector<unsigned long long> > ans;
  while (!o.empty()) {
    vector<unsigned long long> t;
    if (s.empty()) fail();
    auto b = *s.begin();
    t.push_back(b);
    s.erase(b);
    unsigned long long cur = b;
    set<unsigned long long> todel;
    auto i = o.upper_bound(cur);
    while (i != o.end()) {
      auto d = s.upper_bound(*i);
      if (d == s.end()) {
        fail();
      }
      cur = *d;
      t.push_back(*i);
      t.push_back(*d);
      s.erase(*d);
      todel.insert(*i);
      i = o.upper_bound(cur);
    }
    if (todel.empty()) fail();
    for (auto first : todel) o.erase(first);
    ans.push_back(t);
  }
  if (s.size() > 0) {
    for (auto i : s) ans.push_back({i});
  }
  cout << ans.size() << "\n";
  for (auto v : ans) {
    cout << v.size() << " ";
    for (auto i : v) {
      cout << i + 1 << " ";
    }
    cout << "\n";
  }
  return 0;
}
