public static void main ( String [ ] args ) {
  Scanner sc = new Scanner ( System . in ) ;
  String [ ] bodies = new String [ sc . nextInt ( ) ] ;
  int [ ] voted = new int [ bodies . length ] ;
  String temp ;
  int lastElement = 0 ;
  flag : for ( int i = 0 ;
  i < bodies . length ;
  i ++ ) {
    temp = sc . next ( ) ;
    try {
      for ( int j = 0 ;
      j < bodies . length ;
      j ++ ) {
        if ( bodies [ j ] . equals ( temp ) ) {
          voted [ j ] ++ ;
          continue flag ;
        }
      }
    }
    catch ( NullPointerException e ) {
      bodies [ lastElement ] = temp ;
      voted [ lastElement ] ++ ;
      lastElement ++ ;
    }
  }
  int mostVoted = 0 ;
  int mostVotedBody = 0 ;
  for ( int i = 0 ;
  i < voted . length ;
  i ++ ) {
    if ( voted [ i ] > mostVoted ) {
      mostVoted = voted [ i ] ;
      mostVotedBody = i ;
    }
  }
  System . out . println ( bodies [ mostVotedBody ] ) ;
}

public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; String [ ] bodies = new String [ sc . nextInt ( ) ] ; int [ ] voted = new int [ bodies . length ] ; String temp ; int lastElement = 0 ; flag : for ( int i = 0 ; i < bodies . length ; i ++ ) { temp = sc . next ( ) ; try { for ( int j = 0 ; j < bodies . length ; j ++ ) { if ( bodies [ j ] . equals ( temp ) ) { voted [ j ] ++ ; continue flag ; } } } catch ( NullPointerException e ) { bodies [ lastElement ] = temp ; voted [ lastElement ] ++ ; lastElement ++ ; } } int mostVoted = 0 ; int mostVotedBody = 0 ; for ( int i = 0 ; i < voted . length ; i ++ ) { if ( voted [ i ] > mostVoted ) { mostVoted = voted [ i ] ; mostVotedBody = i ; } } System . out . println ( bodies [ mostVotedBody ] ) ; }
(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: (array_type element: (type_identifier) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (type_identifier) dimensions: (dimensions_expr (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (field_access object: (identifier) field: (identifier)))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (labeled_statement (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 (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (try_statement 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: (field_access object: (identifier) field: (identifier))) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (method_invocation object: (array_access array: (identifier) index: (identifier)) name: (identifier) arguments: (argument_list (identifier)))) consequence: (block (expression_statement (update_expression (array_access array: (identifier) index: (identifier)))) (continue_statement (identifier))))))) (catch_clause (catch_formal_parameter (catch_type (type_identifier)) name: (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (identifier))) (expression_statement (update_expression (array_access array: (identifier) index: (identifier)))) (expression_statement (update_expression (identifier))))))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_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: (field_access object: (identifier) field: (identifier))) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (array_access array: (identifier) index: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier)))))))