#include <bits/stdc++.h>
using namespace std;
template <class n, class second>
ostream &operator<<(ostream &p, pair<n, second> x) {
  return p << "<" << x.first << ", " << x.second << ">";
}
template <class n>
auto operator<<(ostream &p, n y) ->
    typename enable_if<!is_same<n, string>::value,
                       decltype(y.begin(), p)>::type {
  int o = 0;
  p << "{";
  for (auto c : y) {
    if (o++) p << ", ";
    p << c;
  }
  return p << "}";
}
void dor() { cerr << '\n'; }
template <class n, class... second>
void dor(n p, second... y) {
  cerr << p << " ";
  dor(y...);
}
template <class n, class second>
void mini(n &p, second y) {
  if (p > y) p = y;
}
template <class n, class second>
void maxi(n &p, second y) {
  if (p < y) p = y;
}
int main() {
  vector<vector<int> > res;
  string second;
  cin >> second;
  while (1) {
    if (second.size() == 0) break;
    int wsk = second.size() - 1;
    vector<int> act;
    for (int i = 0; i < (int)(second.size()); ++i) {
      ;
      if (second[i] == '(') {
        while (wsk > i && second[wsk] != ')') {
          wsk--;
        }
        if (wsk <= i) break;
        act.push_back(i);
        act.push_back(wsk);
        second[i] = ' ';
        second[wsk] = ' ';
      }
    }
    if (act.size() == 0) break;
    res.push_back(act);
  }
  sort((res).begin(), (res).end());
  if (res.size() == 0)
    cout << 0 << '\n';
  else {
    cout << res.size() << '\n';
    for (auto j : res) {
      sort((j).begin(), (j).end());
      cout << j.size() << '\n';
      for (auto i : j) cout << i + 1 << " ";
      cout << '\n';
    }
  }
}
