public static void main ( String [ ] args ) {
  Scanner input = new Scanner ( System . in ) ;
  int n = input . nextInt ( ) ;
  int a [ ] = new int [ 2 ] ;
  a [ 0 ] = input . nextInt ( ) ;
  a [ 1 ] = input . nextInt ( ) ;
  String s = input . next ( ) ;
  if ( s . length ( ) % a [ 0 ] == 0 ) {
    countp = s . length ( ) / a [ 0 ] ;
  }
  else if ( s . length ( ) % a [ 1 ] == 0 ) {
    countq = s . length ( ) / a [ 1 ] ;
  }
  else {
    for ( int i = 0 ;
    i <= 100 ;
    i ++ ) {
      if ( ( s . length ( ) - ( a [ 0 ] * i ) ) % a [ 1 ] == 0 && ( ( s . length ( ) - ( a [ 0 ] * i ) ) / a [ 1 ] ) >= 0 ) {
        countp = i ;
        countq = ( s . length ( ) - ( a [ 0 ] * i ) ) / a [ 1 ] ;
        break ;
      }
    }
  }
  int start = 0 ;
  if ( countp == 0 && countq == 0 ) {
    System . out . println ( "-1" ) ;
  }
  else {
    System . out . println ( countp + countq ) ;
    while ( countp -- > 0 ) {
      System . out . println ( s . substring ( start , start + a [ 0 ] ) ) ;
      start = start + a [ 0 ] ;
    }
    while ( countq -- > 0 ) {
      System . out . println ( s . substring ( start , start + a [ 1 ] ) ) ;
      start += a [ 1 ] ;
    }
  }
}

public static void main ( String [ ] args ) { Scanner input = new Scanner ( System . in ) ; int n = input . nextInt ( ) ; int a [ ] = new int [ 2 ] ; a [ 0 ] = input . nextInt ( ) ; a [ 1 ] = input . nextInt ( ) ; String s = input . next ( ) ; if ( s . length ( ) % a [ 0 ] == 0 ) { countp = s . length ( ) / a [ 0 ] ; } else if ( s . length ( ) % a [ 1 ] == 0 ) { countq = s . length ( ) / a [ 1 ] ; } else { for ( int i = 0 ; i <= 100 ; i ++ ) { if ( ( s . length ( ) - ( a [ 0 ] * i ) ) % a [ 1 ] == 0 && ( ( s . length ( ) - ( a [ 0 ] * i ) ) / a [ 1 ] ) >= 0 ) { countp = i ; countq = ( s . length ( ) - ( a [ 0 ] * i ) ) / a [ 1 ] ; break ; } } } int start = 0 ; if ( countp == 0 && countq == 0 ) { System . out . println ( " - 1" ) ; } else { System . out . println ( countp + countq ) ; while ( countp -- > 0 ) { System . out . println ( s . substring ( start , start + a [ 0 ] ) ) ; start = start + a [ 0 ] ; } while ( countq -- > 0 ) { System . out . println ( s . substring ( start , start + a [ 1 ] ) ) ; start += a [ 1 ] ; } } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (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: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (decimal_integer_literal))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (array_access array: (identifier) index: (decimal_integer_literal))) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (array_access array: (identifier) index: (decimal_integer_literal)))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (array_access array: (identifier) index: (decimal_integer_literal))) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (array_access array: (identifier) index: (decimal_integer_literal)))))) alternative: (block (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (identifier))))) right: (array_access array: (identifier) index: (decimal_integer_literal))) right: (decimal_integer_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (identifier))))) right: (array_access array: (identifier) index: (decimal_integer_literal)))) right: (decimal_integer_literal)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (identifier))))) right: (array_access array: (identifier) index: (decimal_integer_literal))))) (break_statement)))))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal))))) alternative: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier))))) (while_statement condition: (parenthesized_expression (binary_expression left: (update_expression (identifier)) right: (decimal_integer_literal))) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (array_access array: (identifier) index: (decimal_integer_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (array_access array: (identifier) index: (decimal_integer_literal))))))) (while_statement condition: (parenthesized_expression (binary_expression left: (update_expression (identifier)) right: (decimal_integer_literal))) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (array_access array: (identifier) index: (decimal_integer_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (array_access array: (identifier) index: (decimal_integer_literal))))))))))