static HashMap < String , Long > get ( char [ ] a ) {
  int n = a . length ;
  HashMap < String , Long > map = new HashMap < > ( ) ;
  int jou = 1 << n ;
  for ( int i = 0 ;
  i < jou ;
  i ++ ) {
    String tane = "" ;
    String taneb = "" ;
    for ( int j = 0 ;
    j < n ;
    j ++ ) {
      if ( ( ( i >> j ) & 1 ) == 1 ) {
        tane += a [ j ] ;
      }
      else {
        taneb += a [ j ] ;
      }
    }
    String key = tane + ":" + taneb ;
    if ( map . containsKey ( key ) ) {
      map . put ( key , map . get ( key ) + 1 ) ;
    }
    else map . put ( key , 1L ) ;
  }
  return map ;
}

static HashMap < String , Long > get ( char [ ] a ) { int n = a . length ; HashMap < String , Long > map = new HashMap < > ( ) ; int jou = 1 << n ; for ( int i = 0 ; i < jou ; i ++ ) { String tane = " " ; String taneb = " " ; for ( int j = 0 ; j < n ; j ++ ) { if ( ( ( i >> j ) & 1 ) == 1 ) { tane += a [ j ] ; } else { taneb += a [ j ] ; } } String key = tane + " : " + taneb ; if ( map . containsKey ( key ) ) { map . put ( key , map . get ( key ) + 1 ) ; } else map . put ( key , 1L ) ; } return map ; }
(method_declaration (modifiers) type: (generic_type (type_identifier) (type_arguments (type_identifier) (type_identifier))) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (field_access object: (identifier) field: (identifier)))) (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier) (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments)) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (decimal_integer_literal) right: (identifier)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_literal))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (decimal_integer_literal))) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (array_access array: (identifier) index: (identifier))))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (array_access array: (identifier) index: (identifier)))))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (identifier) right: (string_literal)) right: (identifier)))) (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (decimal_integer_literal)))))) alternative: (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal))))))) (return_statement (identifier))))