static String FirstAndLast ( String str ) {
  String [ ] arrOfStr = str . split ( " " ) ;
  String res = "" ;
  for ( String a : arrOfStr ) {
    res += a . substring ( 1 , a . length ( ) - 1 ) + " " ;
  }
  return res ;
}

static String FirstAndLast ( String str ) { String [ ] arrOfStr = str . split ( " ▁ " ) ; String res = " " ; for ( String a : arrOfStr ) { res += a . substring ( 1 , a . length ( ) - 1 ) + " ▁ " ; } return res ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (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 (string_literal))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_literal))) (enhanced_for_statement type: (type_identifier) name: (identifier) value: (identifier) body: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal)))) right: (string_literal)))))) (return_statement (identifier))))