public static void main ( String args [ ] ) {
  Scanner scan = new Scanner ( System . in ) ;
  int [ ] players = new int [ 3 ] ;
  for ( int i = 0 ;
  i < 3 ;
  i ++ ) {
    String s = scan . next ( ) ;
    switch ( s ) {
      case "rock" : players [ i ] = 1 ;
      break ;
      case "paper" : players [ i ] = 2 ;
      break ;
      case "scissors" : players [ i ] = 3 ;
      break ;
    }
  }
  int winner = check ( players ) ;
  if ( winner == 3 ) {
    System . out . println ( "?" ) ;
  }
  else if ( winner == 0 ) {
    System . out . println ( "F" ) ;
  }
  else if ( winner == 1 ) {
    System . out . println ( "M" ) ;
  }
  else {
    System . out . println ( "S" ) ;
  }
}

public static void main ( String args [ ] ) { Scanner scan = new Scanner ( System . in ) ; int [ ] players = new int [ 3 ] ; for ( int i = 0 ; i < 3 ; i ++ ) { String s = scan . next ( ) ; switch ( s ) { case " rock " : players [ i ] = 1 ; break ; case " paper " : players [ i ] = 2 ; break ; case " scissors " : players [ i ] = 3 ; break ; } } int winner = check ( players ) ; if ( winner == 3 ) { System . out . println ( " ? " ) ; } else if ( winner == 0 ) { System . out . println ( " F " ) ; } else if ( winner == 1 ) { System . out . println ( " M " ) ; } else { System . out . println ( " S " ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions))) 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: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (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: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (switch_expression condition: (parenthesized_expression (identifier)) body: (switch_block (switch_block_statement_group (switch_label (string_literal)) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal))) (break_statement)) (switch_block_statement_group (switch_label (string_literal)) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal))) (break_statement)) (switch_block_statement_group (switch_label (string_literal)) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (decimal_integer_literal))) (break_statement)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal))))) alternative: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal))))))))))