public static void main ( String [ ] args ) throws IOException {
  StringBuffer ans = new StringBuffer ( ) ;
  StringTokenizer st ;
  BufferedReader f = new BufferedReader ( new InputStreamReader ( System . in ) ) ;
  st = new StringTokenizer ( f . readLine ( ) ) ;
  ArrayList < Integer > arr = new ArrayList < > ( ) ;
  HashMap < Integer , Integer > map = new HashMap < > ( ) ;
  for ( int i = 0 ;
  i < 6 ;
  i ++ ) {
    arr . add ( Integer . parseInt ( st . nextToken ( ) ) ) ;
    if ( ! map . containsKey ( arr . get ( i ) ) ) {
      map . put ( arr . get ( i ) , 0 ) ;
    }
    map . put ( arr . get ( i ) , map . get ( arr . get ( i ) ) + 1 ) ;
  }
  f . close ( ) ;
  boolean flag = false ;
  int keep = - 1 ;
  for ( int i = 0 ;
  i < 6 ;
  i ++ ) {
    if ( map . get ( arr . get ( i ) ) >= 4 ) {
      keep = arr . get ( i ) ;
      flag = true ;
    }
  }
  if ( ! flag ) {
    System . out . println ( "Alien" ) ;
    return ;
  }
  arr . remove ( ( Integer ) keep ) ;
  arr . remove ( ( Integer ) keep ) ;
  arr . remove ( ( Integer ) keep ) ;
  arr . remove ( ( Integer ) keep ) ;
  int first = arr . get ( 0 ) ;
  int second = arr . get ( 1 ) ;
  if ( second == first ) {
    System . out . println ( "Elephant" ) ;
  }
  else {
    System . out . println ( "Bear" ) ;
  }
  System . out . println ( ans ) ;
}

public static void main ( String [ ] args ) throws IOException { StringBuffer ans = new StringBuffer ( ) ; StringTokenizer st ; BufferedReader f = new BufferedReader ( new InputStreamReader ( System . in ) ) ; st = new StringTokenizer ( f . readLine ( ) ) ; ArrayList < Integer > arr = new ArrayList < > ( ) ; HashMap < Integer , Integer > map = new HashMap < > ( ) ; for ( int i = 0 ; i < 6 ; i ++ ) { arr . add ( Integer . parseInt ( st . nextToken ( ) ) ) ; if ( ! map . containsKey ( arr . get ( i ) ) ) { map . put ( arr . get ( i ) , 0 ) ; } map . put ( arr . get ( i ) , map . get ( arr . get ( i ) ) + 1 ) ; } f . close ( ) ; boolean flag = false ; int keep = - 1 ; for ( int i = 0 ; i < 6 ; i ++ ) { if ( map . get ( arr . get ( i ) ) >= 4 ) { keep = arr . get ( i ) ; flag = true ; } } if ( ! flag ) { System . out . println ( " Alien " ) ; return ; } arr . remove ( ( Integer ) keep ) ; arr . remove ( ( Integer ) keep ) ; arr . remove ( ( Integer ) keep ) ; arr . remove ( ( Integer ) keep ) ; int first = arr . get ( 0 ) ; int second = arr . get ( 1 ) ; if ( second == first ) { System . out . println ( " Elephant " ) ; } else { System . out . println ( " Bear " ) ; } System . out . println ( ans ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))))) (expression_statement (assignment_expression left: (identifier) right: (object_creation_expression type: (type_identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments)) arguments: (argument_list)))) (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier) (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments)) arguments: (argument_list)))) (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 (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))))))) (if_statement condition: (parenthesized_expression (unary_expression operand: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) (decimal_integer_literal)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) right: (decimal_integer_literal))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (false))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (unary_expression operand: (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 (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (true))))))) (if_statement condition: (parenthesized_expression (unary_expression operand: (identifier))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))) (return_statement))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (cast_expression type: (type_identifier) value: (identifier))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (cast_expression type: (type_identifier) value: (identifier))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (cast_expression type: (type_identifier) value: (identifier))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (cast_expression type: (type_identifier) value: (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) 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)))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))