Problem: Oleg writes down the history of the days he lived. For each day he decides if it was good or bad. Oleg calls a non-empty sequence of days a zebra, if it starts with a bad day, ends with a bad day, and good and bad days are alternating in it. Let us denote bad days as 0 and good days as 1. Then, for example, sequences of days 0, 010, 01010 are zebras, while sequences 1, 0110, 0101 are not.

Oleg tells you the story of days he lived in chronological order in form of string consisting of 0 and 1. Now you are interested if it is possible to divide Oleg's life history into several subsequences, each of which is a zebra, and the way it can be done. Each day must belong to exactly one of the subsequences. For each of the subsequences, days forming it must be ordered chronologically. Note that subsequence does not have to be a group of consecutive days. 

Input

In the only line of input data there is a non-empty string s consisting of characters 0 and 1, which describes the history of Oleg's life. Its length (denoted as |s|) does not exceed 200 000 characters.

Output

If there is a way to divide history into zebra subsequences, in the first line of output you should print an integer k (1 ≤ k ≤ |s|), the resulting number of subsequences. In the i-th of following k lines first print the integer li (1 ≤ li ≤ |s|), which is the length of the i-th subsequence, and then li indices of days forming the subsequence. Indices must follow in ascending order. Days are numbered starting from 1. Each index from 1 to n must belong to exactly one subsequence. If there is no way to divide day history into zebra subsequences, print -1.

Subsequences may be printed in any order. If there are several solutions, you may print any of them. You do not have to minimize nor maximize the value of k.

Examples

Input

0010100


Output

3
3 1 3 4
3 2 5 6
1 7


Input

111


Output

-1

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
struct Node {
  int key;
  int color;
  Node *l, *r, *p;
};
struct Tree {
  Node *root;
  Node *begin, *end;
  int size;
};
Tree *create_tree() {
  Tree *T = (Tree *)malloc(sizeof(Tree));
  T->root = T->begin = T->end = NULL;
  T->size = 0;
  return T;
}
Node *right_rotate(Tree *T, Node *B) {
  if (!B->l) return B;
  Node *A = B->l;
  B->l = A->r;
  if (B->l) B->l->p = B;
  A->r = B;
  if (!B->p)
    T->root = A;
  else if (B->p->l == B)
    B->p->l = A;
  else
    B->p->r = A;
  A->p = B->p;
  B->p = A;
  return A;
}
Node *left_rotate(Tree *T, Node *A) {
  if (!A->r) return A;
  Node *B = A->r;
  A->r = B->l;
  if (A->r) A->r->p = A;
  B->l = A;
  if (!A->p)
    T->root = B;
  else if (A->p->l == A)
    A->p->l = B;
  else
    A->p->r = B;
  B->p = A->p;
  A->p = B;
  return B;
}
Node *next(Node *u) {
  if (!u) return NULL;
  if (u->r) {
    u = u->r;
    while (u->l) u = u->l;
    return u;
  } else {
    while (u->p && u->p->r == u) u = u->p;
    return u->p;
  }
}
Node *prev(Node *u) {
  if (!u) return NULL;
  if (u->l) {
    u = u->l;
    while (u->r) u = u->r;
    return u;
  } else {
    while (u->p && u->p->l == u) u = u->p;
    return u->p;
  }
}
int count(Tree *T, int key) {
  Node *u = T->root;
  while (u) {
    if (key < u->key)
      u = u->l;
    else if (key > u->key)
      u = u->r;
    else
      return 1;
  }
  return 0;
}
void insert(Tree *T, int key) {
  Node *x = T->root, *par = NULL;
  while (x) {
    par = x;
    if (key < x->key)
      x = x->l;
    else if (key > x->key)
      x = x->r;
    else
      return;
  }
  x = (Node *)malloc(sizeof(Node));
  x->l = x->r = NULL;
  x->p = par;
  if (!x->p)
    T->root = T->begin = T->end = x;
  else if (key < x->p->key) {
    x->p->l = x;
    if (T->begin == x->p) T->begin = x;
  } else {
    x->p->r = x;
    if (T->end == x->p) T->end = x;
  }
  x->key = key;
  x->color = 1;
  T->size++;
  while (x->p != NULL and x->p->color == 1) {
    if (x->p == x->p->p->l) {
      Node *y = x->p->p->r;
      if (y && y->color == 1) {
        x->p->color = 0;
        y->color = 0;
        x->p->p->color = 1;
        x = x->p->p;
      } else {
        if (x == x->p->r) {
          x = x->p;
          left_rotate(T, x);
        }
        right_rotate(T, x->p->p);
        x->p->color = 0;
        x->p->r->color = 1;
      }
    } else {
      Node *y = x->p->p->l;
      if (y && y->color == 1) {
        x->p->color = 0;
        y->color = 0;
        x->p->p->color = 1;
        x = x->p->p;
      } else {
        if (x == x->p->l) {
          x = x->p;
          right_rotate(T, x);
        }
        left_rotate(T, x->p->p);
        x->p->color = 0;
        x->p->l->color = 1;
      }
    }
  }
  T->root->color = 0;
}
Node *clear(Node *u) {
  if (!u) return NULL;
  clear(u->l);
  clear(u->r);
  free(u);
  return NULL;
}
Tree *delete_tree(Tree *T) {
  if (T) {
    clear(T->root);
    free(T);
  }
  return NULL;
}
void transplant(Tree *T, Node *u, Node *v) {
  if (!u->p)
    T->root = v;
  else if (u == u->p->l)
    u->p->l = v;
  else
    u->p->r = v;
  if (v && u) v->p = u->p;
}
void Delete_fix(Tree *T, Node *x) {
  while (x and x != T->root and x->color == 0) {
    if (x == x->p->l) {
      Node *w = x->p->r;
      if (w->color == 1) {
        w->color = 0;
        x->p->color = 1;
        left_rotate(T, x->p);
        w = x->p->r;
      }
      if (w->l->color == 0 and w->r->color == 0) {
        w->color = 1;
        x = x->p;
      } else {
        if (w->r->color == 0) {
          w->l->color = 0;
          w->color = 1;
          right_rotate(T, w);
          w = x->p->r;
        }
        w->color = x->p->color;
        x->p->color = 0;
        w->r->color = 0;
        left_rotate(T, x->p);
        x = T->root;
      }
    } else {
      Node *w = x->p->l;
      if (w->color == 1) {
        w->color = 0;
        x->p->color = 1;
        left_rotate(T, x->p);
        w = x->p->l;
      }
      if (w->r->color == 0 and w->l->color == 0) {
        w->color = 1;
        x = x->p;
      } else {
        if (w->l->color == 0) {
          w->r->color = 0;
          w->color = 1;
          left_rotate(T, w);
          w = x->p->l;
        }
        w->color = x->p->color;
        x->p->color = 0;
        w->l->color = 0;
        right_rotate(T, x->p);
        x = T->root;
      }
    }
  }
  if (x) x->color = 0;
}
void Delete(Tree *T, Node *z) {
  Node *y = z, *x, *original_z = z;
  int y_original_color = y->color;
  if (T->begin == z) T->begin = next(T->begin);
  if (T->end == z) T->end = prev(T->end);
  if (!z->l) {
    x = z->r;
    transplant(T, z, z->r);
  } else if (!z->r) {
    x = z->l;
    transplant(T, z, z->l);
  } else {
    y = z->r;
    while (y->l) y = y->l;
    y_original_color = y->color;
    x = y->r;
    if (y->p == z) {
      x->p = y;
    } else {
      transplant(T, y, y->r);
      y->r = z->r;
      if (y->r) y->r->p = y;
    }
    transplant(T, z, y);
    y->l = z->l;
    y->l->p = y;
    y->color = z->color;
  }
  if (y_original_color == 0) {
    Delete_fix(T, x);
  }
  free(original_z);
  T->size--;
  if (T->root) T->root->color = 0;
}
const int N = 200006;
char s[N];
int n;
int p;
vector<int> v[N];
Node *getmn(Tree *T) {
  Node *u = T->root;
  if (!u) return NULL;
  while (u->l) u = u->l;
  return u;
}
int main() {
  scanf("%s", s), n = (int)strlen(s);
  Tree *t[2];
  t[0] = create_tree();
  t[1] = create_tree();
  for (int i = 0; i < n; i++) {
    if (s[i] == '0') {
      if (!t[0]->size) insert(t[0], p++);
      int id = t[0]->begin->key;
      Delete(t[0], t[0]->begin);
      insert(t[1], id);
      v[id].push_back(i + 1);
    } else {
      if (!t[1]->size) {
        delete_tree(t[0]);
        delete_tree(t[1]);
        return printf("-1\n"), 0;
      }
      int id = t[1]->begin->key;
      Delete(t[1], t[1]->begin);
      insert(t[0], id);
      v[id].push_back(i + 1);
    }
  }
  if (t[0]->size) {
    delete_tree(t[0]);
    delete_tree(t[1]);
    return printf("-1\n"), 0;
  }
  printf("%d\n", p);
  for (int i = 0; i < p; i++) {
    printf("%d", int(v[i].size()));
    for (int x : v[i]) printf(" %d", x);
    printf("\n");
  }
  delete_tree(t[0]);
  delete_tree(t[1]);
}