public static void main ( String [ ] a ) throws IOException {
  BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ;
  PrintWriter out = new PrintWriter ( System . out ) ;
  char [ ] day = br . readLine ( ) . toCharArray ( ) ;
  Stack < ArrayList < Integer >> zebras = new Stack < ArrayList < Integer >> ( ) ;
  Stack < ArrayList < Integer >> nonZebras = new Stack < ArrayList < Integer >> ( ) ;
  for ( int i = 0 ;
  i < day . length ;
  i ++ ) {
    if ( day [ i ] == '0' ) {
      if ( ! nonZebras . isEmpty ( ) ) {
        ArrayList < Integer > x = nonZebras . pop ( ) ;
        x . add ( i + 1 ) ;
        zebras . push ( x ) ;
      }
      else {
        ArrayList < Integer > x = new ArrayList < Integer > ( ) ;
        x . add ( i + 1 ) ;
        zebras . push ( x ) ;
      }
    }
    else {
      if ( ! zebras . isEmpty ( ) ) {
        ArrayList < Integer > x = zebras . pop ( ) ;
        x . add ( i + 1 ) ;
        nonZebras . push ( x ) ;
      }
      else {
        System . out . println ( - 1 ) ;
        return ;
      }
    }
  }
  if ( nonZebras . isEmpty ( ) ) {
    out . println ( zebras . size ( ) ) ;
    while ( ! zebras . isEmpty ( ) ) {
      ArrayList < Integer > x = zebras . pop ( ) ;
      out . print ( x . size ( ) ) ;
      for ( int s : x ) out . print ( " " + s ) ;
      out . println ( ) ;
    }
  }
  else {
    out . println ( - 1 ) ;
  }
  out . flush ( ) ;
}

public static void main ( String [ ] a ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; PrintWriter out = new PrintWriter ( System . out ) ; char [ ] day = br . readLine ( ) . toCharArray ( ) ; Stack < ArrayList < Integer > > zebras = new Stack < ArrayList < Integer > > ( ) ; Stack < ArrayList < Integer > > nonZebras = new Stack < ArrayList < Integer > > ( ) ; for ( int i = 0 ; i < day . length ; i ++ ) { if ( day [ i ] == '0' ) { if ( ! nonZebras . isEmpty ( ) ) { ArrayList < Integer > x = nonZebras . pop ( ) ; x . add ( i + 1 ) ; zebras . push ( x ) ; } else { ArrayList < Integer > x = new ArrayList < Integer > ( ) ; x . add ( i + 1 ) ; zebras . push ( x ) ; } } else { if ( ! zebras . isEmpty ( ) ) { ArrayList < Integer > x = zebras . pop ( ) ; x . add ( i + 1 ) ; nonZebras . push ( x ) ; } else { System . out . println ( - 1 ) ; return ; } } } if ( nonZebras . isEmpty ( ) ) { out . println ( zebras . size ( ) ) ; while ( ! zebras . isEmpty ( ) ) { ArrayList < Integer > x = zebras . pop ( ) ; out . print ( x . size ( ) ) ; for ( int s : x ) out . print ( " ▁ " + s ) ; out . println ( ) ; } } else { out . println ( - 1 ) ; } out . flush ( ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (generic_type (type_identifier) (type_arguments (type_identifier))))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments (generic_type (type_identifier) (type_arguments (type_identifier))))) arguments: (argument_list)))) (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (generic_type (type_identifier) (type_arguments (type_identifier))))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments (generic_type (type_identifier) (type_arguments (type_identifier))))) arguments: (argument_list)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (field_access object: (identifier) field: (identifier))) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (character_literal))) consequence: (block (if_statement condition: (parenthesized_expression (unary_expression operand: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) consequence: (block (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) alternative: (block (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments (type_identifier))) arguments: (argument_list)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))) alternative: (block (if_statement condition: (parenthesized_expression (unary_expression operand: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) consequence: (block (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) alternative: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (unary_expression operand: (decimal_integer_literal))))) (return_statement))))))) (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))))) (while_statement condition: (parenthesized_expression (unary_expression operand: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) body: (block (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))))) (enhanced_for_statement type: (integral_type) name: (identifier) value: (identifier) body: (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (string_literal) right: (identifier)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) alternative: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (unary_expression operand: (decimal_integer_literal))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))