public static void solve ( ArrayList < String > lecture , HashMap < String , String > words ) {
  for ( int i = 0 ;
  i < lecture . size ( ) ;
  i ++ ) {
    if ( words . get ( lecture . get ( i ) ) . length ( ) < lecture . get ( i ) . length ( ) ) lecture . set ( i , words . get ( lecture . get ( i ) ) ) ;
  }
  for ( int i = 0 ;
  i < lecture . size ( ) - 1 ;
  i ++ ) {
    System . out . print ( lecture . get ( i ) + " " ) ;
  }
  System . out . println ( lecture . get ( lecture . size ( ) - 1 ) ) ;
}

public static void solve ( ArrayList < String > lecture , HashMap < String , String > words ) { for ( int i = 0 ; i < lecture . size ( ) ; i ++ ) { if ( words . get ( lecture . get ( i ) ) . length ( ) < lecture . get ( i ) . length ( ) ) lecture . set ( i , words . get ( lecture . get ( i ) ) ) ; } for ( int i = 0 ; i < lecture . size ( ) - 1 ; i ++ ) { System . out . print ( lecture . get ( i ) + " ▁ " ) ; } System . out . println ( lecture . get ( lecture . size ( ) - 1 ) ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (generic_type (type_identifier) (type_arguments (type_identifier))) name: (identifier)) (formal_parameter type: (generic_type (type_identifier) (type_arguments (type_identifier) (type_identifier))) name: (identifier))) body: (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: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) name: (identifier) arguments: (argument_list)) right: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) name: (identifier) arguments: (argument_list)))) consequence: (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (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: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal))) update: (update_expression (identifier)) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (string_literal))))))) (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 (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal)))))))))