private static void test ( final Scanner sc , final PrintWriter pw ) {
  final int X = sc . nextInt ( ) ;
  final int R = sc . nextInt ( ) ;
  final int C = sc . nextInt ( ) ;
  if ( X >= 7 || ( R * C ) % X != 0 ) {
    pw . print ( "RICHARD" ) ;
  }
  else {
    if ( X == 1 || X == 2 || ( X == 3 && ( R != 1 && C != 1 ) ) || ( X == 4 && ( R >= 4 && C > 2 || C >= 4 && R > 2 ) ) || ( X == 5 && ( ( R >= 4 && C >= 4 ) || ( R == 3 && C >= 10 || R >= 10 && C == 3 ) ) ) || ( X == 6 && ( R >= 4 && C >= 4 && ( R >= 6 || C >= 6 ) ) ) ) {
      pw . print ( "GABRIEL" ) ;
    }
    else {
      pw . print ( "RICHARD" ) ;
    }
  }
}

private static void test ( final Scanner sc , final PrintWriter pw ) { final int X = sc . nextInt ( ) ; final int R = sc . nextInt ( ) ; final int C = sc . nextInt ( ) ; if ( X >= 7 || ( R * C ) % X != 0 ) { pw . print ( " RICHARD " ) ; } else { if ( X == 1 || X == 2 || ( X == 3 && ( R != 1 && C != 1 ) ) || ( X == 4 && ( R >= 4 && C > 2 || C >= 4 && R > 2 ) ) || ( X == 5 && ( ( R >= 4 && C >= 4 ) || ( R == 3 && C >= 10 || R >= 10 && C == 3 ) ) ) || ( X == 6 && ( R >= 4 && C >= 4 && ( R >= 6 || C >= 6 ) ) ) ) { pw . print ( " GABRIEL " ) ; } else { pw . print ( " RICHARD " ) ; } } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter (modifiers) type: (type_identifier) name: (identifier)) (formal_parameter (modifiers) type: (type_identifier) name: (identifier))) body: (block (local_variable_declaration (modifiers) type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration (modifiers) type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration (modifiers) type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier)) right: (decimal_integer_literal)))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))))) alternative: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal))))))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))))))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))))))))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))))))))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))))) alternative: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))))))))))