#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int Search(string pat, string txt) {
  int n = txt.size();
  int m = pat.size();
  for (int i = 0; i <= n - m; i++) {
    int j;
    for (j = 0; j < m; j++) {
      if (txt[i + j] != pat[j]) {
        break;
      }
    }
    if (j == m) {
      return i;
    }
  }
  return -1;
}
int findFirst(const std::vector<int> &array, int key, int low, int high) {
  int ans = -1;
  while (low <= high) {
    int mid = low + (high - low) / 2;
    if (key == array[mid]) {
      ans = mid;
      high = mid - 1;
    } else if (key > array[mid])
      low = mid + 1;
    else
      high = mid - 1;
  }
  return ans;
}
int findLast(const std::vector<int> &array, int key, int low, int high) {
  int ans = -1;
  while (low <= high) {
    int mid = low + (high - low) / 2;
    if (key == array[mid]) {
      ans = mid;
      low = mid + 1;
    } else if (key > array[mid])
      low = mid + 1;
    else
      high = mid - 1;
  }
  return ans;
}
int d, x, y;
void extendedEuclid(int a, int b) {
  if (b == 0) {
    d = 1;
    x = 1;
    y = 0;
  } else {
    extendedEuclid(b, a % b);
    int temp = x;
    x = y;
    y = temp - (a / b) * y;
  }
}
const int N = 2 * (2e6 + 5);
vector<int> adj[N];
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t;
  t = 1;
  for (int tc = 0; tc < t; tc++) {
    string str;
    cin >> str;
    int n = str.size(), ans = 0, mx = 0;
    bool g = 1;
    for (int i = 0; i < n; i++) {
      if (str[i] == '0') {
        adj[ans].push_back(1 + i);
        ans++;
        mx = max(mx, ans);
      } else {
        ans--;
        if (ans < 0) {
          g = 0;
          break;
        }
        adj[ans].push_back(1 + i);
      }
    }
    if (!g) {
      cout << -1 << endl;
      continue;
    }
    g = 1;
    for (int i = 0; i < mx; i++) {
      int indx = adj[i][adj[i].size() - 1];
      if (str[indx - 1] == '1') {
        g = 0;
        break;
      }
    }
    if (!g) {
      cout << -1 << endl;
      continue;
    }
    cout << mx << endl;
    for (int i = 0; i < mx; i++) {
      cout << adj[i].size() << " ";
      for (int j = 0; j < adj[i].size(); j++) cout << adj[i][j] << " ";
      cout << endl;
    }
  }
  return 0;
}
