public static String solve ( String s , int x ) {
  if ( s . equals ( "." ) ) {
    return "" ;
  }
  String t = "" ;
  char c = 'Z' ;
  c -= x ;
  String [ ] u = s . split ( Character . toString ( c ) ) ;
  for ( int i = 0 ;
  i < u . length - 1 ;
  i ++ ) {
    t += c ;
  }
  for ( int i = 0 ;
  i < u . length ;
  i ++ ) {
    if ( i == 0 ) {
      t += solve ( u [ i ] , x + 1 ) ;
    }
    else {
      t += remove ( u [ i ] ) ;
    }
  }
  return t ;
}

public static String solve ( String s , int x ) { if ( s . equals ( " . " ) ) { return " " ; } String t = " " ; char c = ' Z ' ; c -= x ; String [ ] u = s . split ( Character . toString ( c ) ) ; for ( int i = 0 ; i < u . length - 1 ; i ++ ) { t += c ; } for ( int i = 0 ; i < u . length ; i ++ ) { if ( i == 0 ) { t += solve ( u [ i ] , x + 1 ) ; } else { t += remove ( u [ i ] ) ; } } return t ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) consequence: (block (return_statement (string_literal)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (character_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (local_variable_declaration type: (array_type element: (type_identifier) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (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: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (decimal_integer_literal))) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) 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: (field_access object: (identifier) field: (identifier))) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier)) (binary_expression left: (identifier) right: (decimal_integer_literal))))))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier)))))))))) (return_statement (identifier))))