l=list(map(int,input().split()))
temp=[]
mlist=[]
for i in range(6):
    if l[i] not in mlist:
        temp.append(l.count(l[i]))
        mlist.append(l[i])

if len(mlist)==2:
   temp.sort()
   if temp[1]==5:
      print("Bear")
   elif temp[1]==4:
      print("Elephant")
   else:
      print("Alien")
elif len(mlist)==1:
    print("Elephant")

elif len(mlist)==3:
   temp.sort()
   if temp[2]==4:
     print("Bear")
   else:
     print("Alien")
else:
   print("Alien")

from operator import itemgetter
#int(input())
#map(int,input().split())
#[list(map(int,input().split())) for i in range(q)]
#print("YES" * ans + "NO" * (1-ans))
li = list(map(int,input().split()))
li.sort()
flag = 0
ans = 0
for i in range(3):
    flag2 = 1
    for j in range(1,4):
        if li[i+j] != li[i]:
            flag2 = 0
    if flag2 == 1:
        ans = i
    flag = max(flag,flag2)
if flag == 0:
    print("Alien")
else:
    ans2 = 0
    if ans == 0:
        if li[4] == li[5]:
            ans2 = 1
    elif ans == 1:
        if li[0] == li[5]:
            ans2 = 1
    else:
        if li[1] == li[0]:
            ans2 = 1
    print("Bear" * (1 - ans2) + "Elephant" * ans2)

paus = raw_input().split()

paus2 = paus
num = 0
tira = 0
for i in range(len(paus2) - 1, -1, -1):
	for j in range(len(paus2) - 1, -1, -1):
		if i < j and int(paus2[i]) == int(paus2[j]):
			tira = paus2[i]
			if num == 4:
				break

			num += 1
	if num == 4: break
for i in range(len(paus2) - 1, -1, -1):
	if paus2[i] == tira:
		paus2.remove(paus2[i])

if len(paus2) == 2:
	if paus2[0] == paus2[1]:
		print "Elephant"
	else:
		print "Bear"
elif len(paus2) == 0:
	print "Elephant"
elif len(paus2) == 1:
	print "Bear"
else:
	print "Alien"

l = list(map(int, input().split()))
l.sort()
equalCount = 1
y = []
for i in range(5):
    if(l[i] == l[i+1]):
        equalCount += 1
        y.append(i)
        if(equalCount == 4):
            y.append(i+1)
            break
    else:
        y = []
        equalCount = 1
x = []
for i in range(6):
    if(i not in y):
        x.append(l[i])
small = min(x)
large = max(x)
if(len(y) == 4):
    if(small < large):
        print("Bear")
    elif(small == large):
        print("Elephant")
else:
    print("Alien")

string = raw_input();
A = string.split(" ");
A.sort();
A = map(int, A);

def leg_made(A):
    if (A[0]==A[1] and A[1]==A[2] and A[2]==A[3]) or (A[3]==A[4] and A[1]==A[2] and A[2]==A[3]) or (A[3]==A[4] and A[4]==A[5] and A[2]==A[3]):
        return True
    return False

def bear_made(A):
    if leg_made(A):
        if ((A[0]==A[1] and A[1]==A[2] and A[2]==A[3]) and A[4]<A[5]) or ((A[3]==A[4] and A[4]==A[5] and A[2]==A[3]) and A[0]<A[1]) or ((A[3]==A[4] and A[1]==A[2] and A[2]==A[3]) and A[0]<A[5]):
            return True
    return False

def elep_made(A):
    if leg_made(A):
        if ((A[0]==A[1] and A[1]==A[2] and A[2]==A[3]) and A[4]==A[5]) or ((A[3]==A[4] and A[1]==A[2] and A[2]==A[3]) and A[0]==A[5]) or ((A[3]==A[4] and A[4]==A[5] and A[2]==A[3]) and A[0]==A[1]):
            return True
    return False

if not leg_made(A):
    print("Alien")
else:
    if bear_made(A):
        print("Bear")
    elif elep_made(A):
        print("Elephant")

lst = [i for i in input().split()]

a = []

for i in range(1, 10):
    if lst.count(str(i)) > 0:
        a.append(lst.count(str(i)))

a.sort()

if len(a) == 2 and a[0] == 2 and a[1] == 4:
    print('Elephant')
elif len(a) == 3 and a[0] == 1 and a[1] == 1 and a[2] == 4:
    print('Bear')
elif len(a) == 1:
    print('Elephant')
elif len(a) == 2 and a[0] == 1 and a[1] == 5:
    print('Bear')
else:
    print('Alien')

#print(a)

sticks = map(int, raw_input().split())

legs_found = False
leg_size = -1
for i in range(len(sticks)):
    if 6 >= sticks.count(sticks[i]) >= 4:
        leg_size = sticks[i]
        legs_found = True
        break

if legs_found:
    sticks = filter(lambda x: x != leg_size, sticks)

    if len(sticks) >= 2:
        if sticks[0] == sticks[1]:
            result = "Elephant"
        else:
            result = "Bear"
    else:
        if len(sticks) == 0:
            result = "Elephant"
        else:
            result = "Bear"
else:
    result = "Alien"

print result

#!/usr/bin/python2.7
l=sorted(map(int,raw_input().split()))
if l[0]==l[3]: print 'Elephant' if l[4]==l[5] else 'Bear'
elif l[1]==l[4]: print 'Bear'
elif l[2]==l[5]: print 'Elephant' if l[0] == l[1] else 'Bear'
else: print 'Alien'

def solve(a):
    d = {}
    for i in a:
        if(i in d):
            d[i]+=1
        else:
            d[i] = 1
    if(len(d) > 3):
        return "Alien"
    else:
        if len(d) == 1:
            return "Elephant"
        if len(d) == 2:
            for i in d:
                if(d[i] == 4 or d[i] == 2):
                    return "Elephant"
                elif(d[i] == 1):
                    return "Bear"
                elif(d[i] == 3):
                    return "Alien"
        if len(d) == 3:
            for i in d:
                if(d[i] == 2 or d[i] == 3):
                    return "Alien"
            return "Bear"

a = list(map(int,input().split()))
print(solve(a))

a = map(int,raw_input().split())
b = {}
for i in a:
	if i not in b:
		b[i]=1
	else:
		b[i]=b[i]+1
flag = 0
for i in b:
	if b[i]>3:
		flag = 1
		break
if flag==0:
	print "Alien"
else:
	b[i] = b[i]-4
	if(b[i]==0):
		del b[i]
	if len(b)==1:
		print "Elephant"
	else:
		print "Bear"

def main():
    p=[]
    s = raw_input()
    li = map(int, s.split())
    for i in range(0,10):
        p.append(0)

    for i in range(0, 6):
        p[li[i]]=p[li[i]]+1
    p.sort(reverse=True)
    if p[0]==4 and p[1]==2:
        print "Elephant"
    elif p[0]==4 and p[1]==1 and p[2]==1 :
        print "Bear"
    elif p[0]==6:
        print "Elephant"
    elif p[0]==5 and p[1]==1:
        print "Bear"
    else:
        print "Alien"
main()

l=input().split()
s=[]
for i in l:
	s.append(l.count(i))
if( s.count(6)!=0):
	print('Elephant')
elif(s.count(2)!=0 and s.count(4)!=0):
	print('Elephant')
elif(s.count(1)==2 and s.count(4)!=0):
	print('Bear')
elif(s.count(5)!=0):
	print('Bear')
else:
	print('Alien')

l = list(map(int, input().split()))
tt = list(l.count(temp) for temp in l)
tt.sort()
if tt == [1, 5, 5, 5, 5, 5] or tt == [1, 1, 4, 4, 4, 4]:
	print('Bear')
elif tt == [2, 2, 4, 4, 4, 4] or tt == [6, 6, 6, 6, 6, 6]:
	print('Elephant')
else:
	print('Alien')

v=[int(i) for i in input().split()]
v.sort()
count=[0 for i in range(9)]
for i in v:
    count[i-1] += 1
f=0
for i in range(9):
    if(count[i]>=4):
        f=i+1
        break

if(f==0):
    print("Alien")
else:
    c=0
    v2=[]
    for i in range(6):
        if(c==4):
            v2.append(v[i])
        elif(v[i]!=f):
            v2.append(v[i])
        else:
            c=c+1
    if(v2[0]==v2[1]):
        print("Elephant")
    else:
        print("Bear")

a = list(int(x) for x in input().split())
leg =0
if len(set(a))<4:
    for i in set(a):
        if a.count(i)>=4:
            leg = i
            a.remove(leg)
            a.remove(leg)
            a.remove(leg)
            a.remove(leg)
if leg==0:
    print('Alien')
elif len(set(a))==2:
    print('Bear')
else:
    print('Elephant')

a = map(int,raw_input().split())
if a.count(a[0]) <4 and a.count(a[1]) <4 and a.count(a[2]) <4:
    print "Alien"
else:
    if a.count (a[0]) >= 4:
        b  = a[0]
        a.remove(b)
        a.remove(b)
        a.remove(b)
        a.remove(b)
    elif a.count (a[1]) >= 4:
        b = a[1]
        a.remove(b)
        a.remove(b)
        a.remove(b)
        a.remove(b)
    elif a.count (a[2]) >= 4:
        c = a[2]
        a.remove(c)
        a.remove(c)
        a.remove(c)
        a.remove(c)
    if a[0] == a[1]:
        print "Elephant"
    else:
        print "Bear"

# bear h < b
# elephant h == b
# 4 sticks that are equal

nums = map(int, raw_input('').split(' '))
s = nums

s_map = {}

for stick in s:
    if stick not in s_map:
        s_map[stick] = 0
    s_map[stick] += 1

vals = s_map.values()
if len(s_map) == 1:
    print 'Elephant'
elif len(s_map) == 2:
    if (vals[0] == 4 and vals[1] == 2) or (vals[0] == 2 and vals[1] == 4):
        print 'Elephant'
    elif (vals[0] == 5 and vals[1] == 1) or (vals[0] == 1 and vals[1] == 5):
        print 'Bear'
    else:
        print 'Alien'
elif len(s_map) == 3:
    if (vals[0] == 4 or vals[1] == 4 or vals[2] == 4):
        print 'Bear'
    else:
        print 'Alien'
else:
    print 'Alien'

n = list(map(int, input().split()))
l =  [0] * 10
for el in n: l[el] += 1
if max(l) < 4: print('Alien')
elif 1 in l: print('Bear')
else: print('Elephant')

r = raw_input().split( )
r = sorted(r)
k = r[3]
b = []
count = 0
for i in r:
    if k == i:
        count = count + 1
    else:
        b.append(i)
if count == 6:
    print "Elephant"
else:
    if count >= 4:
        if count > 4:
            b.append(r[3])
        if b[0]==b[1]:
            print "Elephant"
        else:
            print "Bear"
    else:
        print "Alien"

# -*- coding: utf-8 -*-
"""
Created on Wed Jul 17 20:40:54 2019

@author: avina
"""

l = list(map(int, input().split()))

l.sort()
k = set(l)
n = len(k)
r = []
for i in k:
    r.append(l.count(i))

if n <=3 and max(r) >= 4:
    if l[0] != l[1]:
        a,b = l[0],l[-1]
    else:
        a,b = l[-2],l[-1]
    if a<b:
        print('Bear')
    else:
        print('Elephant')
else:
    print('Alien')

# def ln(n):
# 	ans = 0
# 	while n>0:
# 		ans += 1
# 		n /= 10
# 	return ans
# n = int(raw_input())
# su = n*2-1
# x = str(su)
# f = True
# for i in x:
# 	if i != '9':
# 		f = False
# 		break
# if f:
# 	print 1
# else:
# 	now = 0
# 	len = ln(su)
# 	b = [False]*(n+1)
# 	d = ""
# 	for i in range(len-1):
# 		d += '9'
# 	for i in range(0,9):
# 		p = int(str(i)+d)
# 		# for j in range(1,n+1):
# 		# 	if not b[j]:
# 		# 		if p-j<=n and p-j>0:
# 		# 			b[j] = True
# 		# 			b[p-j] = True
# 		# 			now += 1
# 		if p>=(n+1):
# 			now += p/2
# 		elif p>(2*n+1):
# 			now += 0
# 		else:
# 			now += (su-p)
# 	print now
# ########################################
# s,a = set('abcdefghijklmnopqrstuvwxyz'),0
# for _ in range(input()-1):
# 	c,w = raw_input().split()
# 	if len(s)==1 and c!='.':a+=1
# 	w = set(w)
# 	if c=='!':s&=w
# 	else:s-=w
# print a
# ###########################################
l = map(int,raw_input().split())
d = {}
for i in range(6):
	d[l[i]] = d.get(l[i],0)+1
if len(d)==1 or len(d)==2 or len(d)==3:
	if len(d)==1:
		print "Elephant"
	else:
		legs = False
		headBody = False
		for i in d:
			if d[i]>=4:
				legs = True
			if d[i]==2:
				headBody = True
		if legs:
			if headBody:
				print "Elephant"
			else:
				print "Bear"
		else:
			print "Alien"
else:
	print "Alien"

a=map(int, raw_input().split())
c=[0]*10
for x in a:
    c[x]+=1
print "Alien" if max(c)<4 else "Bear" if 1 in c else "Elephant"

x = map(int, raw_input().split())

cnt = [0]*10

for i in x:
    cnt[i] += 1

if max(cnt) < 4:
    print 'Alien'
else:
    cnt[cnt.index(max(cnt))] -= 4
    for i in cnt:
        if i != 0 and i < 2:
            print 'Bear'
            break
        elif i == 2:
            print 'Elephant'
            break

from itertools import groupby

L = list(map(int, input().split()))
L.sort()
groups = list(groupby(L))
if len(groups) == 2:
    cnts = [L.count(groups[i][0]) for i in range(2)]
    cnts.sort()
    if (cnts[0] == 2 and cnts[1] == 4):
        print("Elephant")
        exit()
    elif (cnts[0] == 1 and cnts[1] == 5):
        print("Bear")
        exit()
elif len(groups) == 3:
    cnts = [L.count(groups[i][0]) for i in range(3)]
    cnts.sort()
    if (cnts[0] == 1 and cnts[1] == 1 and cnts[2] == 4):
        print("Bear")
        exit()
elif len(groups) == 1:
    print("Elephant")
    exit()

print("Alien")

a=[int(i) for i in input().split()]
f='no'
p=[]
for i in range(6):
    t=0
    for j in range(6):
        if i!=j:
            if a[i]==a[j]:
                t+=1
    if t>=3:
        f='yes'
        p=[]
        p.append(i)
        for j in range(6):
            if a[i]==a[j] and i!=j:
                p.append(j)
        break
if f=='no':
    print('Alien')
else:
    lp=[]
    for i in range(1,7):
        if i-1 not in p:
            lp.append(i-1)
    if len(lp)==0:
        print('Elephant')
    elif len(lp)==1:
        print('Bear')
    else:
        if a[lp[1]]==a[lp[0]]:
            print('Elephant')
        else:
            print('Bear')

# -*- coding: utf-8 -*-

# Universidade Federal de Campina Grande
# Aluno: Diego Adolfo Silva de Araújo
# Matricula: 113210090
# Disciplina: Algoritmos Avançados

# Codeforces
# Problem: 572A - A. Arrays
# Time limit per test: 1 second
# Memory limit per test: 256 megabytes
# Input: standard input
# Output: standard output

sticks = map(int, raw_input().split())
sticks = dict((l, sticks.count(l)) for l in set(sticks))

leg = sticks.values()
if len(sticks) > 3 or (4 not in leg and 5 not in leg and 6 not in leg):
    print 'Alien'
elif len(sticks) == 3 or 1 in leg:
    print 'Bear'
else:
    print 'Elephant'

x=list(map(int,input().split()))
x=sorted(x)
if(x[0]==x[len(x)-1]):
  print("Elephant")
else:
  k=x[-3]
  y=[]
  z=[]
  i=0
  while(i<len(x)):
    if(x[i]==k):
      y=y+[x[i]]
    else:
      z=z+[x[i]]
    i+=1
  z=sorted(z)
  if(len(z)==2):
    if(z[0]==z[1] ):
      print("Elephant")
    elif((z[0]!=z[1] and z[0]<z[1])):
      print("Bear")
  elif(len(z)==1):
    print("Bear")
  else:
    print("Alien")

l=map(int,raw_input().split())
d={}
for i in l:
	if i not in d:
		d[i]=1
	else:
		d[i]+=1
f=0
for i in d:
	if d[i]==4 or d[i]==6:
		del(d[i])
		f=1
		break
	elif d[i]==5:
		f=1
		d[i]=1
		break
if f==0:
	print "Alien"
else:
	if len(d)==1 or len(d)==0:
		print "Elephant"
	else:
		print "Bear"

l=list(map(int,input().split(" ")))
s=set(l)
total=0
if len(s)==1:
	print("Elephant")
elif len(s)==2:
	for i in s:
		if l.count(i)==4:
			total=total+1
		if l.count(i)==2:
			total=total+1
		if l.count(i)==5:
			total=total+1
		if l.count(i)==1:
			total=total+2
	if total==2:
		print("Elephant")
	elif total==3:
		print("Bear")
	else:
		print("Alien")
elif len(s)==3:
	for i in s:
		if l.count(i)==4:
			total=total+1
		if l.count(i)==1:
			total=total+1
	if total==3:
		print("Bear")
	else:
		print("Alien")
else:
	print("Alien")

lst = list(map(int, raw_input().split(' ')))

st = set()

for i in lst:
    nt = lst.count(i)
    st.add(nt)

if (len(st) == 2 and 2 in st and 4 in st) or (len(st) == 1 and 6 in st):
    print 'Elephant'
elif (len(st) == 2 and 4 in st and 1 in st) or (len(st) == 2 and 5 in st):
    print 'Bear'
else:
    print 'Alien'

r=map(int,raw_input().split())
le=[]
s=[x for x in r if r.count(x)==1 or r.count(x)==2]
for i in r:
    if r.count(i)>=4:
        le.append(r)
l=len(le)
if l==0:print 'Alien'
elif l==6:print 'Elephant'
elif l==5:
     if s[0]<le[0]:print 'Bear'
elif l==4:
    a,b=s
    if a==b:print 'Elephant'
    else:print 'Bear'

import sys

l = [int(x) for x in (sys.stdin.readline()).split()]

l.sort()

k = l[3]

temp = []

for i in l:
    if(k != i):
        temp.append(i)

sz = len(temp)

if(sz == 0):
    print("Elephant")
elif(sz == 1):
    print("Bear")
elif(sz == 2):
    if(temp[0] != temp[1]):
        print("Bear")
    else:
        print("Elephant")
else:
    print("Alien")

a=list(map(lambda x:int(x),raw_input().split(' ')))
k=dict()
for i in a:
    if i in k:
        k[i]+=1
    else:
        k[i]=1

s=k.values()
s.sort()
if s==[2,4] or s==[6] :
    print "Elephant"
elif s==[1,1,4] or s==[1,5]:
    print "Bear"
else:
    print "Alien"

'''
Created on 26/09/2014

@author: DAVID
'''

import sys

sticks = [int(i) for i in sys.stdin.readline().split()]

sticks.sort( )

count = 1
legs = False
elephant = False
g = {}
for i in sticks:
    if not i in g:
        g[i] = 1
    else:
        g[i] += 1

for i in g:
    if g[i] == 6:
        legs = True
        elephant = True
    elif g[i] >= 4:
        legs = True
    elif g[i] == 2:
        elephant = True

if not legs:
    print "Alien"
elif elephant:
    print "Elephant"
else:
    print "Bear"

from collections import Counter

def main():
    c = Counter(raw_input().split())
    appear = sorted(c.values(), reverse=True)
    if appear[0] >= 4:
        if len(appear) == 1 or appear[1] == 2:
            print "Elephant"
        else:
            print "Bear"
    else:
        print "Alien"

if __name__ == "__main__":
    main()

lis = list(map(int,input().split()))
x = {}
for i in lis:
    if i not in x:
        x[i]=1
    else:
        x[i]+=1
tmp = []
flag=0
for i in x:
    if(x[i]!=4):
        tmp.append(i)
    if(x[i]>=4):
        flag=1
if(len(set(tmp))==1 and flag):
    print("Elephant")
elif(len(set(tmp))==2 and flag):
    print("Bear")
else:
    print("Alien")

a = raw_input("")
lista = []
listaValores=[]

while len(a)!=11:
	a = raw_input("")

for x in a:
	if x == ' ':
		pass
	else:
		lista.append(x)

#print "lista total",lista

umaVez = list(set(lista))

#print "lista de unicos", umaVez

for x in umaVez:
	listaValores.append(lista.count(x))

#print "lista de valores", listaValores

if (4 in listaValores) or (6 in listaValores) or (5 in listaValores):
	if (2 in listaValores) or (6 in listaValores):
		print "Elephant"
	elif (listaValores.count(1)==2) or (5 in listaValores):
		print "Bear"
	else:
		print "Alien"
else:
	print "Alien"

# ===============================
# (c) MidAndFeed aka ASilentVoice
# ===============================
import math, fractions
# ===============================
q = [int(x) for x in input().split()]
sq = set(q)
if not(any(q.count(x) >= 4 for x in sq)):
	print("Alien")
else:
	if len(sq) == 3:
		print("Bear")
	elif len(sq) == 1:
		print("Elephant")
	else:
		if any(q.count(x) > 4 for x in sq):
			print("Bear")
		else:
			print("Elephant")

ls = map(int, raw_input().split())
d = {}
for l in ls:
    if l not in d:
        d[l] = 0
    d[l] += 1
i = d.items()
i.sort(key = lambda x: x[1], reverse = True)
if i[0][1] == 4 and len(i) == 3:
    print "Bear"
elif i[0][1] == 4 and len(i) == 2:
    print "Elephant"
elif i[0][1] == 5:
    print "Bear"
elif i[0][1] == 6:
    print "Elephant"
else:
    print "Alien"

def run():
    nums=map(int,raw_input().split())
    #print nums
    maps={}
    for i in range(1,10):
        maps[i]=0
    #print maps
    for each in nums:
        maps[each]+=1
    #print maps
    sort=sorted(maps.items(),key=lambda x:x[1], reverse=True)
    #print sort
    if sort[0][1]==4:
        if sort[1][1]==2:
            print 'Elephant'
        else:
            print 'Bear'
    elif sort[0][1]==5:
        print 'Bear'
    elif sort[0][1]==6:
        print 'Elephant'
    else:
        print 'Alien'

    pass
run()

x=[int(a) for a in input().split()]
x=sorted(x)
y=[0]*10
for i in range(6):
    y[x[i]]+=1
y.sort(reverse=True)
if y[0]==6:
    print("Elephant")
elif y[0]==5:
    print("Bear")
elif y[0]==4:
    if y[1]==2:
        print("Elephant")
    else:
        print("Bear")
else:
    print("Alien")

arr = list(map(int,input().split()))

unique = set(arr)

same = []

for i in unique:
    same.append(arr.count(i))

if max(same) < 4:
    print('Alien')
elif max(same) % 2 == 0and min(same) % 2 == 0:
    print('Elephant')
else:
    print('Bear')

lst=map(int,raw_input().split())
if len(set(lst))==1:
    print "Elephant"
elif len(set(lst))==3:
    for num in set(lst):
        if lst.count(num)==4:
            print "Bear"
            break
    else:
        print "Alien"
elif len(set(lst))==2:
    for num in set(lst):
        if lst.count(num)==4:
            pass
        elif lst.count(num)==2:
            print "Elephant"
        elif lst.count(num)==1:
            print "Bear"
        elif lst.count(num)==3:
            print "Alien"
            break
else:
    print "Alien"

data_input=map(int, raw_input().split(' '))

def answer(data_input):
	repetition_frequency=[data_input.count(i) for i in set(data_input)]
	if 6 in repetition_frequency:
		print 'Elephant'
	elif 5 in repetition_frequency:
		print 'Bear'
	elif 4 in repetition_frequency and 2 in repetition_frequency:
		print 'Elephant'
	elif 4 in repetition_frequency:
		print 'Bear'
	else:
		print 'Alien'

answer(data_input)

l=list(input().split())
k1=l.count(l[0])
k2=l.count(l[1])
k3=l.count(l[2])
if k1>=4:
    s=[x for x in l if x !=l[0]]
    if  len(s)==2 and s[0]==s[1] or len(s)==0:
        print("Elephant")
    elif len(s)==1 or len(s)==2 and s[0]!=s[1]:
        print("Bear")
elif k2>=4:
    s=[x for x in l if x !=l[1]]
    if  len(s)==2 and s[0]==s[1] or len(s)==0 :
        print("Elephant")
    elif len(s)==1 or len(s)==2 and s[0]!=s[1]:
        print("Bear")
elif k3>=4:
    s=[x for x in l if x !=l[2]]
    if len(s)==2 and s[0]==s[1] or len(s)==0:
        print("Elephant")
    elif len(s)==1 or  len(s)==2 and s[0]!=s[1]:
        print("Bear")
else:
    print("Alien")

arr = map(int, raw_input().split())

arr.sort()
found = False
i = 0
#print arr
while i+3<len(arr):
    #print i
    if arr[i]==arr[i+1]==arr[i+2]==arr[i+3]:
        found = True
        break
    i+=1
if found:
    if i==0:
        if arr[4]==arr[5]:
            print 'Elephant'
        else:
            print 'Bear'
    elif i==1:
        if arr[0]==arr[5]:
            print 'Elephant'
        else:
            print 'Bear'
    else:
        if arr[0]==arr[1]:
            print 'Elephant'
        else:
            print 'Bear'
else:
    print 'Alien'

from collections import Counter
a=Counter(map(int,raw_input().split()))
if sorted(list(a.values())) in [[1,1,4], [1,5]]: print "Bear"
elif sorted(list(a.values())) in [[2,4], [6]]: print "Elephant"
else: print "Alien"

s = input()
a = s.split()
b = []
for i in range(len(a)):
	a[i] = int(a[i])
	b.append(a[i])

b.sort()
i = 0
while i < len(b)-1:
	if  b[i] == b[i+1]:
		b. remove(b[i+1])
	else:
		i += 1

if len(b) > 3:
	print('Alien')
elif len(b) == 1:
	print('Elephant')
elif len(b) == 2:
	if a.count(b[0]) == 4 or a.count(b[1]) == 4:
		print('Elephant')
	elif a.count(b[0]) == 5 or a.count(b[1]) == 5:
		print('Bear')
	else:
		print('Alien')
elif len(b) == 3:
	if a.count(b[0]) == 4:
		if b[1] == b[2]:
			print('Elephant')
		else:
			print('Bear')
	elif a.count(b[1]) == 4:
		if b[0] == b[2]:
			print('Elephant')
		else:
			print('Bear')
	elif a.count(b[2]) == 4:
		if b[0] == b[1]:
			print('Elephant')
		else:
			print('Bear')
	else:
		print('Alien')

dic = {}
ar = [int(i)for i in input().split(' ')]
from collections import Counter
dic = Counter(ar)

legs = 0
body = 0
for i in dic:
	if dic[i]>=4:
		legs = 4
		dic[i]-=4
		break

for i in dic:
	if dic[i]>0:
		body+=1

if legs ==4 and body ==1:
	print('Elephant')
elif legs==4 and body ==2:
	print('Bear')
else:
	print('Alien')

a= raw_input().split()
b=list(set(a))
l=len(b)
if l>3:
    print "Alien"
elif l==1:
    print "Elephant"
elif l==2:
    i0=a.count(b[0])
    i1=a.count(b[1])
    if i0<4 and i1<4:
        print "Alien"
    elif i0==5 or i1==5:
        print "Bear"
    else:
        print "Elephant"
else:
    i0=a.count(b[0])
    i1=a.count(b[1])
    i2=a.count(b[2])
    if max(i0,i1,i2)!=4:
        print "Alien"
    else:
        print "Bear"

f=input()
f=f.split(" ")
f.sort()
check1=False
check2=False
check3=False
i=0
while i<6:
    if f.count(f[i])>=4:
        i+=f.count(f[i])
        check1=True
        if f.count(f[0])==5:
            check3=True
            break
        elif f.count(f[0])==6:
            check2=True
            break
    elif f.count(f[i])==2:
        check2=True
        i+=2
    elif f.count(f[0])==1:
        check3=True
        i+=1
    else:
        break
if check1:
    if check2:
        print("Elephant")
    else:
        print("Bear")
else:
    print("Alien")

m=[0]*10
for i in map(int,input().split()):m[i]+=1
for i in range(10):
 if m[i]>=4:
  m[i]-=4
  print(["Elephant","Bear"][max(m)%2])
  break
else:print("Alien")

l = list(map(int,input().split()))
s = {}
for i in range(6):
    if l[i] in s:
        s[l[i]]+=1
    else:
        s[l[i]]=1
l1 = list(s.values())
tpm = max(l1)
if tpm>=4:
    if tpm==5:
        print('Bear')
    elif tpm==6:
        print('Elephant')
    elif tpm==4 and len(l1)==2:
        print('Elephant')
    elif tpm==4 and len(l1)==3:
        print('Bear')
else:
    print('Alien')

def main():
    x = [int(y) for y in input().split()] #Lectura de datos
    x.sort()
    rank = [0 for y in range(1,x[5]+2)]
    patas = -1
    r = []
    for i in range(0,len(x)):
        rank[x[i]]+=1
        if(rank[x[i]] == 4):
            patas=x[i]
    if(patas != -1):
        while(rank[patas] > 4):
            rank[patas]-=1
            r.append(patas)
        for i in range(0,len(x)):
            if(x[i]!=patas):
                r.append(x[i])
        r.sort()
        if(r[0] == r[1]):
            print("Elephant")
        elif(r[0] < r[1]):
            print("Bear")
        else:
            print("Alien")
    else:
        print("Alien")
main()

mylist = list(map(int, input().split()))
myset = list(set(mylist))
flag = 0
elephant = 0
for i in range(0, len(myset)):
    if(mylist.count(myset[i]) == 2):
        elephant = 1
    if(mylist.count(myset[i]) >= 4):
        flag = 1
    if(mylist.count(myset[i]) == 6):
        flag = 1
        elephant = 1
if flag == 0:
    print("Alien")
else:
    if(elephant == 1):
        print("Elephant")
    else:
        print("Bear")

from collections import defaultdict
a = defaultdict(int)
for i in map(int, input().split()):
    a[i] += 1
d = defaultdict(int)
for v in a.values():
    d[v] += 1
if d[6] or (d[4] and d[2]):
    print('Elephant')
elif d[5] or (d[4] and d[1] == 2):
    print('Bear')
else:
    print('Alien')

l=list(map(int,input().split()))
a=set(l)
if(len(a)==1):
    print('Elephant')
else:
    for i in a:
        if l.count(i)==4:
            if len(a)==3:
                print('Bear')
                break

            elif len(a)==2:
                print('Elephant')
                break

        elif l.count(i)==5:
            if(len(a)==2):
                print('Bear')
                break
    else:
        print('Alien')

import operator as op
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from functools import reduce
from itertools import (
    accumulate, combinations, combinations_with_replacement, groupby,
    permutations, product)
from math import (acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot,
                  log2, pi, radians, sin, sqrt, tan)
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
    return(int(input()))

def inlist():
    return(list(map(int, input().split())))

def instr():
    s = input()
    return(list(s[:len(s)]))

def invr():
    return(map(int, input().split()))

def def_value():
    return 0

# For getting input from input.txt file
#sys.stdin = open('input.txt', 'r')
# Printing the Output to output.txt file
# sys.stdout = open('output.txt', 'w')

a = inlist()
a = sorted(a, key=lambda d: a.count(d), reverse=True)

for i in range(3):
    if a[i] != a[i+1]:
        print("Alien")
        sys.exit()
if a[4] != a[5]:
    print("Bear")
elif a[4] == a[5]:
    print("Elephant")

data = [int(i) for i in input().split()]
data.sort()
dic = {k:data.count(k) for k in set(data)}

isAlien = True
legKey = 0
headAndBody = []
for key in dic:
    if(dic[key] >= 4):
        legKey = key
        isAlien = False
for key in dic:
    if key != legKey:
        headAndBody.append(key)

if(isAlien):
    print("Alien")
else:
    if(len(headAndBody) == 2):
        if(headAndBody[0] == headAndBody[1]):
            print("Elephant")
        else:
            print( "Bear" )
    else:
        if(len(headAndBody) == 0 or dic[headAndBody[0]] == 2):
            print("Elephant")
        else:
            if(legKey == headAndBody[0]):
                print("Elephant")
            else:
                print( "Bear" )

x=[int(x) for x in input().split()]
y=list(set(x))
if len(y)==1:
    print('Elephant')
elif len(y)==2:
    if x.count(y[0])==4 or x.count(y[1])==4:
            print('Elephant')
    elif x.count(y[0])==5 or x.count(y[1])==5:
            print('Bear')
    else:
        print('Alien')
elif len(y)==3:
    if x.count(y[0]) == 4 or x.count(y[1]) == 4 or x.count(y[2])==4:
        print('Bear')
    else:
        print('Alien')
else:
    print('Alien')

from collections import Counter
def solved(dic,lst):
    chan = 0
    get  = 0
    #print(dic)
    if dic == {0: 6}:
        return 'Alien'
    l = list(dic.values())
    if len(l) <= 2:
        if len(l) == 1:
            return 'Elephant'
        else:
            ok = False
            bear  =False
            for i in l:
                if i == 4:
                    ok = True
                if i == 1:
                    bear = True
            if ok:
                return 'Elephant'
            if bear:
                return 'Bear'
            else:
                return 'Alien'
    elif len(l) == 3:
        ok = False
        for i in l:
            if i == 4:
                ok = True
        if ok:
            return 'Bear'
        else:
            return 'Alien'
    else:
        return 'Alien'

if __name__ == '__main__':
    lst = list(map(int,input().split()))
    dic = Counter(lst)
    print(solved(dic,lst))

a = [int (i) for i in input().split()]
dic = {}
for i in range (6):
    dic[a[i]] = dic.get(a[i], 0) + 1
if len (dic) == 1:
    print ('Elephant')
elif len(dic) > 3:
    print ('Alien')
elif len(dic) == 3:
    if 4 in dic.values():
        print ('Bear')
    else:
        print ('Alien')
else:
    if 5 in dic.values():
        print ('Bear')
    elif 4 in dic.values():
        print ('Elephant')
    else:
        print ('Alien')

l = list(map(int,input().split()))
n = len(l)
x = max(l , key= l.count)

if l.count(x) < 4 :
    print('Alien')
    exit()

a = []
for i in l :
    if i != x :
        a.append(i)

#print(a)
y = 2 - len(a)
if len(a) < 2 :
    for i in range(y):
        a.append(x)
#print(a)

if a[0] != a[1]:
    print('Bear')
else:
    print('Elephant')

l = [int(x) for x in input().split()]
l.sort()
temp = l[0]
index = 0
count = 1
for i in range(1, 6):
    if(l[i] == temp):
        count += 1
    else:
        temp = l[i]
        index = i+1
        count = 1
    if count == 4:
        break
if(count == 4):
    l = l[0:index]+l[index+4:]
    if(l[0]!=l[1]):
        print("Bear")
    else:
        print("Elephant")
else:
    print("Alien")

l=list(map(int,input().split()))
sl=list(set(l))
t=l
for i in sl:
    if l.count(i)>=4:
        for __ in range(4):
            t.remove(i)
        if t[0]==t[1]:
            print('Elephant')
        else:
            print('Bear')
        break
else:
    print('Alien')

from collections import Counter

c = Counter(input().split())
if all(c[i] < 4 for i in c):
    print("Alien")
elif any(c[i] == 1 for i in c):
    print("Bear")
else:
    print("Elephant")

# 471A
a = input().split()
a = list(map(int,a))
def sort(a):
    for i in range(len(a)):
        for j in range(i+1,len(a)):
            if a[i] > a[j]:
                s = a[i]
                a[i] = a[j]
                a[j] = s
    return a
def counter(a):
    g = a[0]
    b = [1]
    for i in range(1,len(a)):
        if a[i] == g:
            b[len(b)-1] += 1
        else:
            g = a[i]
            b.append(1)
    return b
a = sort(a)
b = counter(a)
m = 0
for j in range(len(b)):
    if m < b[j]:
        m = b[j]
if m < 4:
    print('Alien')
else:
    if len(b) <= 2:
        if m == 5:
            print('Bear')
        else:
            print('Elephant')
    else:
        print('Bear')

# coding: utf-8

sticks = map(int, raw_input().split())

def isPossible(lista):
	for i in lista:
		count = 0
		for j in lista:
			if i == j:
				count += 1
		if (count >= 4):
			return count, i
	return -1, -1

def clearLista(lista, var):
	newList = []
	for i in lista:
		if i != var:
			newList.append(i)
	if len(newList) == 0:
		newList.append(var)
		newList.append(var)
	elif len(newList) == 1:
		newList.append(var)
	return newList

count, perna = isPossible(sticks)

if (count >= 4):
	sticks = clearLista(sticks, perna)
	if sticks[0] == sticks[1]:
		print "Elephant"
	else:
		print "Bear"
else:
	print "Alien"

l = list(map(int, input().split()))
n = len(l)
elephant = False
bear = False

for i in range(0, n) :
    for j in range(i + 1, n) :
        f = 0
        bad = False
        for c in range(0, n) :
            if (i == c or j == c) :
                continue
            if (f == 0) :
                f = l[c]
            if (f != l[c]) :
                bad = True

        if (bad == False) :
            if (l[i] == l[j]) :
                elephant = True
            if (l[i] != l[j]) :
                bear = True

if (not elephant and not bear) :
    print("Alien")
elif (elephant) :
    print("Elephant")
else :
    print("Bear")

# MUH and Sticks

l = map(int, raw_input().split())
l1 = set(l)

judge = 'Alien'
if len(l1) == 3:
    for item in l1:
        if l.count(item) == 4:
            judge = 'Bear'
            break
elif len(l1) == 2:
    for item in l1:
        if l.count(item) == 4:
            judge = 'Elephant'
            break
        elif l.count(item) == 5:
            judge = 'Bear'
            break
elif len(l1) == 1:
    judge = 'Elephant'

print judge

l = list(map(int, input().split()))

l.sort()

k = -1

for i in l:
    c = 0
    for j in l:
        if i == j:
            c += 1
    if c >= 4:
        k = i
        break

if k == -1:
    print('Alien')
else:
    for i in range(4):
        l.remove(k)
    if l[0] == l[1]:
        print('Elephant')
    else:
        print('Bear')

from collections import Counter
ar = list(map(int,input().split()))
s = set(ar)
legs = False
ele = False
eleP = False
bearP = False
for i in s:
    if ar.count(i)==4:
        legs = True
    if ar.count(i)==2:
        ele = True
    if ar.count(i)==6:
        eleP = True
    if ar.count(i)==5:
        bearP = True
if bearP:
    print("Bear")
elif eleP :
    print("Elephant")
elif ele and legs:
    print("Elephant")
elif legs:
    print("Bear")
else:
    print("Alien")

#!/usr/bin/env python3
from collections import Counter
sticks = list(map(int, input().split()))
cnt_list = Counter(sticks).most_common()

if cnt_list[0][1] == 6:
    print("Elephant")
    exit()
if cnt_list[0][1] == 5:
    print("Bear")
    exit()
if cnt_list[0][1] < 4:
    print("Alien")
    exit()

if cnt_list[1][1] == 2:
    print("Elephant")
else:
    print("Bear")

from collections import Counter

s = Counter(map(int, raw_input().split()))

l = None
hb = None

for i in s:
    if s[i] >= 4:
        l = i
    else:
        hb = i

if l:
    if s[i] == 6 or s[hb] == 2:
        print 'Elephant'
    else:
        print 'Bear'
else:
    print 'Alien'

def count_legs(palochki):
    for i in palochki:
        if palochki.count(i)>=4:
            return True
    return False
def what_animal(palochki):
    not_legs=[]
    four_legs=1
    for i in palochki:
        if palochki.count(i)==6:
            return 'Elephant'
        if palochki.count(i)>=4 and four_legs<=4:
            legs=i
            four_legs+=1
        else:
            not_legs.append(i)
    if not_legs[0]==not_legs[1]:
        return 'Elephant'
    else:
        return 'Bear'

palochki=raw_input()
palochki=palochki.split(' ')
for i in range(len(palochki)):
    palochki[i]=int(palochki[i])
if count_legs(palochki):
    print what_animal(palochki)
else:
    print 'Alien'

l=list(map(int,input().split()))
s=sorted([l.count(x) for x in set(l)])
if len(s)==1 or len(s)==s[0]: print('Elephant')
elif len(s)==s[0]*2 or len(s)==s[-1]-s[0]: print('Bear')
else: print('Alien')

import fileinput

A = []

for line in fileinput.input():
    A = map(int, line.split())
    break

counts = []
for x in set(A):
    counts.append(A.count(x))

counts.sort()
if counts == [1, 1, 4] or counts == [1,5]:
    print "Bear"
elif counts == [2,4] or counts == [6]:
    print "Elephant"
else:
    print "Alien"

l=[int(x) for x in raw_input().split()]
chk=[0]*11
for i in l:
    chk[i]+=1
print 'Alien' if max(chk)<4 else 'Bear' if 1 in chk else 'Elephant'

x = map(int,raw_input().split())
x.sort()
a=[]
dic={}
flag=True
for i in range(1,10):
    dic[i]=0
for i in x:
    dic[i]=dic[i]+1
for i in x:
    if dic[i]==4:
        d=i
        flag=False
        break
    elif dic[i]>4:
        d=i
        flag=False
        break
if flag:
    print "Alien"
else:
    if dic[d]==4:
        for i in x:
            if i!=d:
                a.append(i)
        a.sort()
        if a[0]==a[1]:
            print "Elephant"
        else:
            print "Bear"
    elif dic[d]==5:
        print "Bear"
    elif dic[d]==6:
        print "Elephant"

l=[int(x) for x in raw_input().split()]
a=[0,0,0,0,0,0,0,0,0,0]
for i in l:
    a[i]+=1
if 6 in a:
    print 'Elephant'
elif 5 in a:
    print 'Bear'
elif 4 in a and 2 in a:
    print 'Elephant'
elif 4 in a and 1 in a:
    print 'Bear'
else:
    print 'Alien'

#
#   Bad codeforces template TM
#
#       Zeyu Chen, 2019
#

from sys import stdin, stdout, setrecursionlimit
input = stdin.readline
flush = stdout.flush

#setrecursionlimit(1000000)

############################################################

OUT = []

def write(item, sep = " "):
    if type(item) is int:
        OUT.append(str(item))
    elif type(item) is list:
        if type(item[0]) is int:
            OUT.append(sep.join(map(str, item)))
        else:
            OUT.append(sep.join(item))
    else:
        OUT.append(item)

def PRINT():
    print("\n".join(OUT))

GI = lambda: int(input())
GS = lambda: input()[:-1]

gi = lambda: list(map(int, input().split()))
gs = lambda: input().split()

############################################################

arr = gi()

for i in arr:
    cnt = arr.count(i)
    if cnt == 4:
        left = [j for j in arr if i != j]
        if left[0] == left[1]:
            write("Elephant")
        else:
            write("Bear")
        break
else:
    write("Alien")

############################################################

PRINT()

def solve(a):
    d = {}
    for i in a:
        if(i in d):
            d[i]+=1
        else:
            d[i] = 1
    if(len(d) == 1):
        return "Elephant"
    elif(len(d) > 3):
        return "Alien"
    else:
        for i in d:
            if(d[i] == 2):
                return "Elephant"
        return "Bear"
a = list(map(int,input().split()))
print(solve(a))

string_list_int = map(int, raw_input().split())
Set = set(string_list_int)
l = []

for x in Set :

    l.append(string_list_int.count(x))

if len(Set) > 3 or 3 in l :

    print 'Alien'

else :

    if (len(Set) == 2 and 2 in l) or len(Set) == 1 :

        print 'Elephant'

    else :

        print 'Bear'

a=list(map(int,input().split()))
b=set(a)
l=len(b)
o=a.count(min(a))
c=a.count(max(a))
if l==3:
    if o==4 or c==4:
        print("Bear")
    else:
        print("Alien")
elif l<=2 and l>0:
    if o==2 or c==2:
        print("Elephant")
    elif max(a)==min(a):
        print("Elephant")
    elif o==3 or c==3:
        print("Alien")
    else:
        print("Bear")
else:
    print("Alien")

'''
Created on 26/09/2014

@author: DAVID
'''

import sys

sticks = [int(i) for i in sys.stdin.readline().split()]

sticks.sort( )

count = 1
legs = False
elephant = False
for i in range(len(sticks) - 1):
    if sticks[i] == sticks[i + 1]:
        count += 1
    else:
        if count == 2:
            elephant = True
        if count == 4:
            legs = True
        count = 1

if count == 4:
    legs = True
elif count == 2:
    elephant = True

if not legs:
    print "Alien"
elif elephant:
    print "Elephant"
else:
    print "Bear"

a = map(int, raw_input().split())
a.sort()
if a.count(a[0])==1 and a.count(a[5])==1 and a.count(a[1])==4:
    print 'Bear'
elif (((a.count(a[4])==1 and a.count(a[5])==1) or a.count(a[5])==2) and a.count(a[1])==4) or a.count(a[5])==6:
    print 'Elephant'
else:
    print 'Alien'

l=list(map(int,input().split(" ")))
s=set(l)
a=list()
if len(s)>3:
	print("Alien")
else:
	for i in range(0,6):
		if l.count(l[i])!=4:
			a.append(l[i])
	if a[0]==a[1]:
		print("Elephant")
	else:
		print("Bear")

import fileinput

A = []

for line in fileinput.input():
    A = map(int, line.split())
    break

counts = []
for x in set(A):
    counts.append(A.count(x))

counts.sort()
if counts == [1, 1, 4]:
    print "Bear"
elif counts == [2,4]:
    print "Elephant"
else:
    print "Alien"

l=list(map(int,input().split()))
s=list(set(l))
t=len(s)
if t==1:
    print('Elephant')
elif t==2:
    if (l.count(s[0])==4 or l.count(s[1])==4):
        print('Elephant')
    else:
        print('Alien')
elif t==3:
    if (l.count(s[0])==4 or l.count(s[1])==4 or l.count(s[2])==4):
        print('Bear')
    else:
        print('Alien')
else:
    print('Alien')

list = list(map(int, input().split(" ")))
list.sort()
count=0
count1=-1
index =[]
list.append(-1)

for i in range(len(list)-1):
     count= list.count(list[i])
     if list[i] == list[i+1]:
        count1 = count1 +1
     if count==1:
         index.append(i)
if len(index)==2 or len(index)== 1 :
    print('Bear')
elif len(index)==0 and count!=3:
    print('Elephant')
elif count==3:
    print('Alien')
else:
    print('Alien')

#n = int(input())
#n, m = map(int, input().split())
#s = input()
c = list(map(int, input().split()))
c.sort()
for i in range(3):
    if c.count(c[i]) > 3:
        for j in range(4):
            c.pop(0)
        if c[0] == c[1]:
            print('Elephant')
        else:
            print('Bear')
        break
else:
    print('Alien')

read = lambda: map(int, raw_input().split())
read_s = lambda: map(str, raw_input().split())

a = sorted(read())
for i in a:
    if a.count(i) == 4:
        c, d = sorted([x for x in a if x != i])
        if c < d:
            print 'Bear'
            exit(0)
        else:
            print 'Elephant'
            exit(0)
else:
    print 'Alien'

from collections import Counter
s = sorted(Counter(map(int,raw_input().split())).values())
if s==[1,1,4] or s==[1,5]:
	print 'Bear'
elif s==[2,4] or s==[6]:
	print 'Elephant'
else:
	print 'Alieno'

__author__ = 'Андрей'
import sys

a = list(map(int, input().split()))
p = [0] * 10
for item in a:
    p[item] += 1
for item in p:
    if item == 4:
        for itm in p:
            if itm == 1:
                print('Bear')
                sys.exit()
            elif itm == 2:
                print('Elephant')
                sys.exit()
print('Alien')

l=list(map(int,input().split()))
s=sorted([l.count(x) for x in set(l)])
if len(s)==1 or len(s)==s[0]: print('Elephant')
elif len(s)==s[0]+1 or len(s)==s[-1]-s[0]: print('Bear')
else: print('Alien')

# -*- coding: utf-8 -*-

# Universidade Federal de Campina Grande
# Aluno: Diego Adolfo Silva de Araújo
# Matricula: 113210090
# Disciplina: Algoritmos Avançados

# Codeforces
# Problem: 572A - A. Arrays
# Time limit per test: 1 second
# Memory limit per test: 256 megabytes
# Input: standard input
# Output: standard output

sticks = map(int, raw_input().split())
sticks = dict((l, sticks.count(l)) for l in set(sticks))

if len(sticks) > 3 or 4 not in sticks.values():
    print 'Alien'
elif len(sticks) == 3 or sticks[min(sticks.keys())] == 1:
    print 'Bear'
else:
    print 'Elephant'

sticks=[int(i) for i in input().split()]
flag=0
for i in sticks:
    if(sticks.count(i)>=4):
        flag=1
        for j in range(1,5):
            sticks.remove(i)
if(flag==0):
    print("Alien")
else:
    if(sticks[0]<sticks[1]):
        print("Bear")
    else:
        print("Elephant")

a=list(map(int,input().split()))
b=n=d=0
o=[]
for i in a:
    if i not in o:
        o.append(i)
        if len(o)>3:
            print("Alien")
            break
for i in a:
    if i == o[0]:
        b += 1
    elif i == o[1]:
        n += 1
    elif i == o[2]:
        d += 1
if len(o)!=4:
    if (b or n or d)==6:
        print("Elephant")
    elif (b or n or d)==5:
        print("Bear")
    else:
        if b==4:
            if n!=d:
                print("Elephant")
            else:
                print("Bear")
        elif n==4:
            if b!=d:
                print("Elephant")
            else:
                print("Bear")
        elif d==4:
            if b!=n:
                print("Elephant")
            else:
                print("Bear")
        else:
            print("Alien")

l=list(map(int,input().split()))
l.sort()
dic={}
for i in l:
    if dic.get(i):
        dic[i]+=1
    else:
        dic[i]=1
key=list(dic.keys())
#print(key)
if len(key)>3:
    print("Alien")
    exit(0)
elif len(key)==3:
    print("Bear")
elif len(key)==2:
    flag=0

    for k,v in dic.items():
        if v==5:
    #        print("Bear")
     #       exit(0)
            flag=1
    if flag:
        print("Bear")
    else:
        print("Elephant")
else:
    print("Elephant")

a = map(int,raw_input().split())
s =[]
for i in a:
    if i not in s:
        s.append(i)

if len(s)>3:
    print "Alien"
elif len(s)==1:
    print "Elephant"
elif len(s)==3:
    print "Bear"
else:
    l = a.count(s[0])
    if l==5 or l==1:
        print "Bear"
    elif l == 4 or l== 2 :
        print "Elephant"
    else :
        print "Alien"
i=0

temp=raw_input()
x=[int(i) for i in temp.split()]
import collections
y=collections.Counter(x)
li=[]
for i in y:
    li.append(y[i])
li=sorted(li)
li=li[::-1]
for i in range(0,len(li)):
    if(li[0]>=4):
        li=li[1:]
        if(len(li)>=2):
            print "Bear"
            break
        else:
            print "Elephant"
            break
    else:
        print "Alien"
        break

def main():
	arr = list(map(int,input().split()))
	dp = [0 for _ in range(10)]
	for i in range(len(arr)):
		dp[arr[i]]+=1
	flag = True
	index = 0
	for i in range(len(dp)):
		if dp[i]==4:
			flag = False
			index = i
			break
	if flag:
		print("Alien")
	else:
		add = sum(arr)
		for i in range(len(dp)):
			if dp[i]==2:
				print("Elephant")
				return
		print("Bear")
		return

main()

x=[int(a) for a in input().split()]
y=set(x)
y=sorted(y)
if len(y)==3:
    if x.count(y[1])==4 or x.count(y[0])==4:
        print("Bear")
    else:
        print("Alien")
elif len(y)==1:
    print("Elephant")
    quit()
elif len(y)==2:
    c=x.count(y[0])
    if x.count(y[1])!=4:
        print("Alien")
        quit
    if c==1:
        print("Bear")
    else:
        print("Elephant")
else:
    print("Alien")

paus = raw_input().split()

paus2 = paus
num = 0
for i in range(len(paus2) - 1, -1, -1):
	for j in range(len(paus2) - 1, -1, -1):
		if i < j and int(paus2[i]) == int(paus2[j]):
			if num == 4:
				break
			paus2.remove(paus2[i])
			num += 1
	if num == 4: break

if len(paus2) == 3:
	if paus2[0] != paus2[1]:
		print "Bear"
	elif paus2[0] == paus2[1]:
		print "Elephant"
elif len(paus2) == 2:
	print "Elephant"
else:
	print "Alien"

# You lost the game.
L = list(map(int, input().split()))
M = [0 for _ in range(9)]
for i in range(6):
    M[L[i]-1] += 1
if M.count(4):
    if M.count(2):
        print("Elephant")
    else:
        print("Bear")
else:
    print("Alien")

a=[int(i) for i in input().split()]

b=[]
k=0

b=set(a)
x=a[0]
if len(b)==2 and a.count(x)!=3:
    print("Elephant")
elif len(b)==3:
    for i in b:
        if a.count(i)==4:
            k=1
    if k==1:
        print("Bear")
    else:
        print("Alien")
else:
    print("Alien")

l = map(int,raw_input().split())
hist = [0]*10
for i in l:
    hist[i] += 1
if max(hist) != 4:
    print "Alien"
elif min(hist) == 2:
    print "Elephant"
else:
    print "Bear"

l = list(map(int, input().split()))
s = dict()
for i in range(len(l)):
    if(l[i] in s):
        s[l[i]] += 1
    else:
        s[l[i]] = 1
if(len(s) == 2):
    print("Elephant")
elif(len(s) == 3):
    print("Bear")
else:
    print("Alien")

sticks = raw_input()
sticks = sticks.strip().split()

count = [0,0,0]

for i in sticks:
    if int(i) == 4:
        count[0] += 1
    elif count[1] == 0:
        count[1] = i
    else:
        count[2] = i

if count[0] < 4:
    print "Alien"
elif count[1] == count[2]:
    print "Elephant"
else:
    print "Bear"

from operator import itemgetter
#int(input())
#map(int,input().split())
#[list(map(int,input().split())) for i in range(q)]
#print("YES" * ans + "NO" * (1-ans))
li = list(map(int,input().split()))
li.sort()
flag = 0
ans = 0
for i in range(3):
    flag2 = 1
    for j in range(1,4):
        if li[i+j] != li[i]:
            flag2 = 0
    if flag2 == 1:
        ans = i
    flag = max(flag,flag2)
if flag == 0:
    print("Alien")
else:
    ans2 = 0
    if ans == 0:
        if li[4] == li[5]:
            ans2 = 1
    elif ans == 1:

        if li[0] == li[5]:
            ans2 = 1
    else:
        if li[1] == li[2]:
            ans2 = 1
    print("Bear" * (1 - ans2) + "Elephant" * ans2)

string = raw_input();
A = string.split(" ");
A.sort();
A = map(int, A);

def leg_made(A):
    if (A[0]==A[1] and A[1]==A[2] and A[2]==A[3]) or (A[3]==A[4] and A[1]==A[2] and A[2]==A[3]) or (A[3]==A[4] and A[4]==A[5] and A[2]==A[3]):
        return True
    return False

def bear_made(A):
    if leg_made(A):
        if ((A[0]==A[1] and A[1]==A[2] and A[2]==A[3]) and A[4]<A[5]) or ((A[3]==A[4] and A[4]==A[5] and A[2]==A[3]) and A[0]<A[1]) or ((A[3]==A[4] and A[1]==A[2] and A[2]==A[3]) and A[0]<A[5]):
            return True
    return False

def elep_made(A):
    if leg_made(A):
        if ((A[0]==A[1] and A[1]==A[2] and A[2]==A[3]) and A[4]==A[5]) or ((A[3]==A[4] and A[1]==A[2] and A[2]==A[3]) and A[0]==A[5]) or ((A[3]==A[4] and A[4]==A[5] and A[2]==A[3]) and A[0]==A[1]):
            return True
    return False

print A;
if not leg_made(A):
    print("Alien")
else:
    if bear_made(A):
        print("Bear")
    elif elep_made(A):
        print("Elephant")

import operator as op
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from functools import reduce
from itertools import (
    accumulate, combinations, combinations_with_replacement, groupby,
    permutations, product)
from math import (acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot,
                  log2, pi, radians, sin, sqrt, tan)
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
    return(int(input()))

def inlist():
    return(list(map(int, input().split())))

def instr():
    s = input()
    return(list(s[:len(s)]))

def invr():
    return(map(int, input().split()))

def def_value():
    return 0

# For getting input from input.txt file
#sys.stdin = open('input.txt', 'r')
# Printing the Output to output.txt file
# sys.stdout = open('output.txt', 'w')

a = inlist()
a = sorted(a, key=lambda d: a.count(d), reverse=True)

for i in range(3):
    if a[i] != a[i+1]:
        print("Alien")
        sys.exit()
if a[4] < a[5]:
    print("Bear")
elif a[4] == a[5]:
    print("Elephant")
else:
    print("Alien")

l=list(map(int,input().split()))
a=set(l)
if(len(a)>3):
    print('Alien')
else:
    for i in a:
        if l.count(i)==4:
            while i in l: l.remove(i)
        elif l.count(i)==5:
            while i in l: l.remove(i)
            l.append(i)
    if(l[0]==l[1]):
        print('Elephant')
    else:
        print('Bear')

# MUH and Sticks

l = map(int, raw_input().split())
l1 = set(l)

if len(l1) > 3:
    print 'Alien'
elif len(l1) == 3:
    for item in l1:
        if l.count(item) == 4:
            print 'Bear'
            break
elif len(l1) == 2:
    for item in l1:
        if l.count(item) == 4:
            print 'Elephant'
            break
        else:
            print 'Bear'
            break
else:
    print 'Elephant'

a = raw_input("")
lista = []
listaValores=[]

while len(a)!=11:
	#print("entradas erradas")
	a = raw_input("")

for x in a:
	if x == ' ':
		pass
	else:
		lista.append(x)

#print "lista total",lista

umaVez = list(set(lista))

#print "lista de unicos", umaVez

for x in umaVez:
	listaValores.append(lista.count(x))

#print "lista de valores", listaValores

if 4 in listaValores:
	if (2 in listaValores):
		print "Elephant"
	elif (listaValores.count(1)==2):
		print "Bear"
	else:
		print "Alien"
else:
	print "Alien"

__author__ = 'Андрей'
import sys

a = list(map(int, input().split()))
p = [0] * 10
for item in a:
    p[item] += 1
for item in p:
    if item == 4:
        for itm in p:
            if itm == 1:
                print('Bear')
                sys.exit()
            elif itm == 2:
                print('Elephant')
                sys.exit()
print('Alien')

l=input().split()
s=[]
for i in l:
	s.append(l.count(i))
if(s.count(4)==0):
	print('Alien')
elif(s.count(2)!=0):
	print('Elephant')
else:
	print('Bear')

l=list(map(int,input().split()))
l.sort()
dic={}
s=set(l)
u=0
for i in s:
    if l.count(s)==4:
        u=1
if u==0:
    print("Alien")
    exit(0)
for i in l:
    if dic.get(i):
        dic[i]+=1
    else:
        dic[i]=1
key=list(dic.keys())
#print(key)
if len(key)>3:
    print("Alien")
    exit(0)
elif len(key)==3:
    print("Bear")
elif len(key)==2:
    flag=0

    for k,v in dic.items():
        if v==5:
    #        print("Bear")
     #       exit(0)
            flag=1
    if flag:
        print("Bear")
    else:
        print("Elephant")
else:
    print("Elephant")

*l,=map(int,input().split())
d={i:l.count(i)-4 if l.count(i)>4 else l.count(i) for i in l if l.count(i)!=4}
if len(d)==1:print('Elephant')
elif len(d)==2:print('Bear')
else:print('Alien')

x = [0 for i in range(10)]
lst = list(map(int,input().split()))
for i in range(6):
    x[lst[i]] += 1
ans = []
for i in range(len(x)):
    if(x[i] != 0):
        ans.append(x[i])
if(4 not in ans and len(ans) > 1):
    print("Alien")
    exit()
if(len(ans) <= 2):
    print("Elephant")
    exit()
print("Bear")

arr = map(int, raw_input().split())
a = ['Bear', 'Elephant']
l = [i for i in arr if arr.count(i) <= 2]
if len(l) == 2:
    print a[l[0] == l[1]]
elif len(l) == 1:
    print a[0]
elif len(l) == 0:
    print a[1]
else:
    print 'Alien'

#coding: utf-8
a = map(int, raw_input().split())

count = 0
legs_len = 0

for i in range(len(a)):
	count = 0
	for b in range(len(a)):
		if(a[i] == a[b]):
			count += 1
		if(count == 4):
			break
	if(count == 4):
		legs_len = a[i]
		break

if(count < 4):
	print 'Alien'
	exit()

count = 0
i = 0

for i in range(len(a)):
	index_ref = 0
	if(a[i] != legs_len):
		count += 1
		if(count == 2):
			break
		index_ref = i

if((a[index_ref] < a[i]) or (a[i] < a[index_ref])):
	print 'Bear'
else:
	print 'Elephant'

l=[int(x) for x in raw_input().split()]
A=len(set(l))
ans=chk=0

a=[0,0,0,0,0,0,0,0,0,0]
for i in l:
    a[i]+=1
if 4 not in a:
    print 'Alien'
else:
    if 2 in a:
#        if a.index(2)>a.index(4):
        print 'Elephant'
#        else:
#            print 'Alien'
    else:
        c=a.index(4)
        if 1 in a[:c] and 1 in a[c:]:
            print 'Bear'
        else:
            print 'Alien'

from sys import stdin, stdout
input = stdin.readline

l = list(map(int, input().split()))
l.sort()

if l.count(l[0]) == 2 and l.count(l[3]) == 4 or l.count(l[0]) == 4 and l.count(l[3]) == 2:
         stdout.write("Elephant")

elif l[1] == l[2] == l[3] == l[4] or l[1] == l[2] == l[3] == l[0] or l[5] == l[2] == l[3] == l[4]:
         stdout.write("Bear")

else:
         stdout.write("Alien")

import math
def fact(n):
    ans = 1
    for i in range(2, n+1):
        ans*= i
    return ans
def comb(n, c):
    return fact(n)//(fact(n-c)*c)

l = list(map(int, input().split()))
d = {}
two = 0
for i in range(6):
    if(l[i] in d):
        d[l[i]]+=1
    else:
        d[l[i]] = 1
if(len(d)==1):
    if(list(d.values())[0]==6):
        print('Elephant')
    else:
        print('Alien')
elif(len(d) > 3 or len(d)< 2):
    print('Alien')
else:
    if(len(d)==2):
        if(2 not in list(d.values())):
            print('Alien')
        else:
            print('Elephant')
    else:
        if(4 not in list(d.values()) and 1 not in list(d.values())):
            print('Alien')
        else:
            print('Bear')

a = map(int, raw_input().split())
b = list(set(a))
c = [0]*9
for i in a:
	c[i]=c[i]+1
if len(b)==1:
		print "Elephant"
if len(b)==2: #1 1 1 1 1 5 | 1 2 2 1 1 1
	for i in c:
		if i == 5:
			print "Bear"
		else:
			print "Elephant"
if len(b)==3: #11 22 33 | 1 1 1 1 2 3
	for i in c:
		if i == 4:
			print "Bear"
		else:
			print "Alien"
if len(b)>3:
		print "Alien"

def has_legs(lengths_array):
    for x in lengths_array:
        if x == 4:
            return True
    else:
        return False

def determine_animal(lengths_array):
    for x in lengths_array:
        if x == 1:
            return 'Bear'
        elif x == 2 or x == 6:
            return 'Elephant'

def count_sticks(lengths):
    lengths_array = [0]*6
    for x in lengths:
        lengths_array[x-1] += 1
    return lengths_array

lengths_input = [int(x) for x in input().split()]
lengths_array = count_sticks(lengths_input)
if has_legs(lengths_array):
    animal = determine_animal(lengths_array)
    print(animal)
else:
    print('Alien')

x=[int(a) for a in input().split()]
y=set(x)
y=sorted(y)
if len(y)==3:
    if x.count(y[2])==4:
        print("Bear")
    else:
        print("Alien")
elif len(y)==1:
    print("Elephant")
    quit()
elif len(y)==2:
    c=x.count(y[0])
    if x.count(y[1])!=4:
        print("Alien")
        quit()
    if c==1:
        print("Bear")
    else:
        print("Elephant")
else:
    print("Alien")

d={}
for i in map(int,input().split()):
	d[i]=d.get(i,0)+1
if not 4 in d.values() and not 5 in d.values():
	print("Alien")
else:
	a=[]
	for i in d:
		if d[i]!=4:
			for j in range(d[i]):
				a.append(i)
	if a[0]==a[1]:
		print("Elephant")
	else:
		print("Bear")

l=list(map(int,input().split(" ")))
s=set(l)
a=list()
if len(s)>3:
	print("Alien")
else:
	for i in range(0,6):
		if l.count(l[i])!=4:
			a.append(l[i])
	if a[0]==a[1]:
		print("Elephant")
	else:
		print("Bear")

a = map(int, raw_input().split())
b = list(set(a))
c = [0]*10
for i in a:
	c[i]=c[i]+1
c = sorted(c,reverse=True)
if len(b)==1:
		print "Elephant"
if len(b)==2: #1 1 1 1 1 5 | 1 2 2 1 1 1 | 5 5 5 6 6 6
	cnt = 0
	for i in c:
		if i == 5:
			print "Bear"
			exit()
		else:
			if i == 3:
				print "Alien"
				exit()
	print "Elephant"
if len(b)==3: #11 22 33 | 1 1 1 1 2 3
	for i in c:
		if i == 4:
			print "Bear"
	exit()
	print "Alien"
if len(b)>3:
		print "Alien"

#n=int(raw_input())
d=[]
d=map(long, raw_input().split())
mn=min(d)
mn_c=0
mx=max(d)
mx_c=0
av=0
av_c=0
for i in range(6):
    if(d[i]!=mx and d[i]!=mn):
        av=d[i]
        av_c+=1
    if(d[i]==mx):
        mx_c+=1
    if(d[i]==mn):
        mn_c+=1
if(av_c==4 and d.count(av)==4):
    av_c=4
elif(av_c==4 and d.count(av)!=4):
    av_c=6
if(av_c==0 or mx==mn):
    print "Elephant"
elif(av_c==4):
    print "Bear"
else:
    print "Alien"

from collections import Counter
def solved(dic):
    chan = 0
    #print(dic)
    if dic == {0: 6}:
        return 'Alien'
    if len(list(dic.values())) == 3:
        for k,v in dic.items():
            if v == 4:
                chan = k
        if chan != 0:
            return 'Bear'
    elif len(list(dic.values())) == 2:
        for k,v in dic.items():
            if v == 4:
                chan = k
        if chan != 0:
            return 'Elephant'
    elif len(list(dic.values())) == 1:
        return 'Elephant'
    else:
        return 'Alien'
if __name__ == '__main__':
    lst = list(map(int,input().split()))
    dic = Counter(lst)
    print(solved(dic))

l = list(map(int, input().split()))
n = len(l)
elephant = False
bear = False

for i in range(0, n) :
    for j in range(i + 1, n) :
        f = 0
        bad = False
        for c in range(0, n) :
            if (i == c or j == c) :
                continue
            if (f == 0) :
                f = l[c]
            if (f != l[c]) :
                bad = True

        if (bad == False) :
            if (l[i] == l[j]) :
                elephant = True
            if (l[i] < l[j]) :
                bear = True

if (not elephant and not bear) :
    print("Alien")
elif (elephant) :
    print("Elephant")
else :
    print("Bear")

'''
Created on 26/09/2014

@author: User
'''
import sys
l = sys.stdin.readline().strip().split()
d = {}
flag = False
minus = 0
mayor = 0
for i in l:
    if i not in d:
        d[i] = 0
    d[i] += 1

for i in d:
    if d[i] == 4:
        flag = True
        legs = i
if flag:
    d_sort = sorted(d.keys())
    d_sort.remove(legs)
    if len(d_sort) == 2:
        minus = min(d_sort)
        mayor = max(d_sort)
        if minus < mayor:
            print "Bear"
        else:
            print "Elephant"
    elif len(d_sort) == 1:
        print "Elephant"
else:
    print "Alien"

list = list(map(int, input().split(" ")))
list.sort()
count=0
count1=1
index =[]
list.append(-1)

for i in range(len(list)-1):
     count= list.count(list[i])
     if list[i] == list[i+1]:
        count1 = count1 +1
     if count==1:
         index.append(i)

if len(index)==2 or len(index)== 1 :
    print('Bear')
elif len(index)==0 and count1==3:
    print('Elephant')
elif count1==3:
    print('Alien')
else:
    print('Alien')

# -*- coding: utf-8 -*-
"""
Created on Wed Jul 17 20:40:54 2019

@author: avina
"""

l = list(map(int, input().split()))

l.sort()
n = len(set(l))
if n <=3:
    if l[1] == l[0]:
        print('Elephant')
    else:
        print('Bear')
else:
    print('Alien')

import sys,collections

sticks = sys.stdin.readline().strip().split(' ')

stick_map = collections.Counter()

for stick in sticks:
    stick_map[stick] += 1

sm_val = stick_map.values()
sm_val.sort()
if len(stick_map) == 2 and sm_val[0] == 2 and sm_val[1] == 4:
    print "Elephant"
elif len(stick_map) == 3 and sm_val[0] == 1 and sm_val[1] == 1 and sm_val[2] == 4:
    print "Bear"
else:
    print "Alien"

from sys import stdin, stdout
input = stdin.readline

l = list(map(int, input().split()))
l.sort()

if l[0] == l[1] == l[2] == l[3] and l[4] == l[5] and l[4] != l[3]:
         stdout.write("Elephant")

elif l[1] == l[2] == l[3] == l[4] and l[5] > l[4] and l[1] > l[0]:
         stdout.write("Bear")

else:
         stdout.write("Alien")

x=map(int,raw_input().split())
y={}
for i in x:
    if i not in y:
        y[i]=1
    else:
        y[i]+=1
x=y.keys()
if max(y.values())!=4:
    print "Alien"
else:
    i=y.values().index(max(y.values()))
    x.remove(x[i])
    if(len(x)==1):
        print "Elephant"
    elif(min(x)!=max):
        print  "Bear"
    else:
        print "Alien"

b=[]
b+=raw_input()
temp=0
for i in range(0,5):
        for j in range(0,10,2):
            if b[j]>b[j+2]:
                temp=b[j]
                b[j]=b[j+2]
                b[j+2]=temp
if b[0]==b[2]==b[4]==b[6] and b[8]==b[10] and b[8]>=b[0]:
    print "Elephant"
elif b[2]==b[4]==b[6]==b[8] and b[10]>b[8] and b[0]<b[2]:
    print "Bear"
else:
    print "Alien"

x=[int(a) for a in input().split()]
y=set(x)
if len(y)==3:
    print("Bear")
elif len(y)==2 or len(y)==1:
    print("Elephant")
else:
    print("Alien")

a=[int(i) for i in input().split()]

b=[]
k=0

b=set(a)
x=a[0]
if len(b)==2 and a.count(x)!=3:
    print("Elephant")
elif len(b)==3:
    for i in b:
        if a.count(i)==4:
            k=1
    if k==1:
        print("Bear")
    else:
        print("Alien")
else:
    print("Alien")

a = list(map(int, input().split()))
h = {}
for i in range(6):
    if a[i] not in h:
        h[a[i]] = 1
    else:
        h[a[i]] += 1

for n in h:
    if h[n]==6:
        print('Elephant')
        break

    elif h[n]==4:
        if len(h)==2:
            print('Elephant')
            break

        elif len(h)==3:
            print('Bear')
            break

        elif len(h)>3:
            print('Alien')
            break
    elif h[n]==5:
        print('Bear')
        break
    else:
        print('Alien')
        break

#!/usr/bin/python

def main():
	result={}
	lst=raw_input().split()
	alien=True
	for i in lst:
		if i not in result:
			result[i]=1
		else:
			result[i]+=1
	rem=[]
	for key, val in result.iteritems():
		if val>=4:
			alien=False
		else:
			rem.append(key)

	if alien:
		print 'Alien'
	else:
		if len(rem)<=1:
			print 'Elephant'
		else:
			print 'Bear'

if __name__=='__main__':
	main()

l = list(map(int,input().split()))
d = dict()
for i in l:
    if not (i in d) :
        d[i] = 1
    else :
        d[i] +=1
if len(d) == 2 or len(d) == 1:
    print("Elephant")
elif len(d) == 3:
    print("Bear")
else :
    print("Alien")

# 471A
a = input().split()
a = list(map(int,a))
def sort(a):
    for i in range(len(a)):
        for j in range(i+1,len(a)):
            if a[i] > a[j]:
                s = a[i]
                a[i] = a[j]
                a[j] = s
    return a
def counter(a):
    g = a[0]
    b = [1]
    for i in range(1,len(a)):
        if a[i] == g:
            b[len(b)-1] += 1
        else:
            g = a[i]
            b.append(1)
    return b
a = sort(a)
b = counter(a)
m = 0
for j in range(len(b)):
    if m < b[j]:
        m = b[j]
if m < 4:
    print('Alien')
else:
    if len(b) <= 2:
        print('Elephant')
    else:
        print('Bear')

list = list(map(int, input().split(" ")))
list.sort()
count=0
count1=-1
index =[]
list.append(-1)

for i in range(len(list)-1):
     count= list.count(list[i])
     if list[i] == list[i+1]:
        count1 = count1 +1
     if count==1:
         index.append(i)
if (len(index)==2 or len(index)== 1) and (count1 !=1 or len(index)==0) :
    print('Bear')
elif len(index)==0 and count!=3 and count1!=2:
    print('Elephant')
elif count==3:
    print('Alien')
else:
    print('Alien')

sticks = map(int, raw_input().split())

legs_found = False
leg_size = -1
for i in range(len(sticks)):
    if sticks.count(sticks[i]) == 4:
        leg_size = sticks[i]
        legs_found = True
        break

if legs_found:
    sticks = filter(lambda x: x != leg_size, sticks)

    if sticks[0] == sticks[1]:
        result = "Elephant"
    else:
        result = "Bear"
else:
    result = "Alien"

print result

string = raw_input();
A = string.split(" ");
A.sort();
A = map(int, A);

def leg_made(A):
    if (A[0]==A[1] and A[1]==A[2] and A[2]==A[3]) or (A[3]==A[4] and A[1]==A[2] and A[2]==A[3]) or (A[3]==A[4] and A[4]==A[5] and A[2]==A[3]):
        return True
    return False

def bear_made(A):
    if leg_made(A):
        if ((A[0]==A[1] and A[1]==A[2] and A[2]==A[3]) and A[4]<A[5]) or ((A[3]==A[4] and A[4]==A[5] and A[2]==A[3]) and A[1]<A[2]) or (A[3]==A[4] and A[1]==A[2] and A[2]==A[3]):
            return True
    return False

def elep_made(A):
    if leg_made(A):
        if ((A[0]==A[1] and A[1]==A[2] and A[2]==A[3]) and A[4]==A[5]) or ((A[3]==A[4] and A[4]==A[5] and A[2]==A[3]) and A[1]==A[2]):
            return True
    return False

if not leg_made(A):
    print("Alien")
else:
    if bear_made(A):
        print("Bear")
    elif elep_made(A):
        print("Elephant")

from collections import Counter
ar = list(map(int,input().split()))
s = set(ar)
legs = False
ele = False
for i in s:
    if ar.count(i)==4:
        legs = True
    if ar.count(i)==2:
        ele = True
if ele and legs:
    print("Elephant")
elif legs:
    print("Bear")
else:
    print("Alien")

from __future__ import division, print_function

def main():
    a = [int(_) for _ in input().split()]
    f = Counter(a)
    size = len(f)
    if size == 3:
        print("Bear")
    elif size == 2:
        print("Elephant")
    else:
        print("Alien")

# PyPy 2 Fast IO
py2 = round(0.5)
if py2:
    from future_builtins import ascii, filter, hex, map, oct, zip
    range = xrange

import os, sys
from io import IOBase, BytesIO

BUFSIZE = 8192
class FastIO(BytesIO):
    newlines = 0

    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None

    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0,2), super(FastIO, self).write(s))[0])
        return s

    def read(self):
        while self._fill(): pass
        return super(FastIO,self).read()

    def readline(self):
        while self.newlines == 0:
            s = self._fill(); self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s:self.buffer.write(s.encode('ascii'))
            self.read = lambda:self.buffer.read().decode('ascii')
            self.readline = lambda:self.buffer.readline().decode('ascii')

sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip('\r\n')

# Importing Modules
import math
import collections

from collections import Counter
from math import fabs

if __name__ == "__main__":
    main()

string_list_int = map(int, raw_input().split())
Set = set(string_list_int)
l = []

for x in Set :

    l.append(string_list_int.count(x))

if len(Set) > 3 :

    print 'Alien'

else :

    if (len(Set) == 2 and 2 in l) or len(Set) == 1 :

        print 'Elephant'

    else :

        print 'Bear'

x = [0 for i in range(10)]
lst = list(map(int,input().split()))
for i in range(6):
    x[lst[i]] += 1
ans = []
for i in range(len(x)):
    if(x[i] != 0):
        ans.append(x[i])
if(4 not in ans and len(ans) >= 2):
    print("Alien")
    exit()
if(len(ans) == 2 and 4 in ans or len(ans) == 1):
    print("Elephant")
    exit()
print("Bear")

from sys import stdin, stdout
input = stdin.readline

l = list(map(int, input().split()))
l.sort()

if l.count(l[0]) == 2 and l.count(l[3]) == 4 or l.count(l[0]) == 4 and l.count(l[3]) == 2:
         stdout.write("Elephant")

elif l[1] == l[2] == l[3] == l[4] or l[1] == l[2] == l[3] == l[0] or l[5] == l[2] == l[3] == l[4]:
         stdout.write("Bear")

else:
         stdout.write("Alien")

a, b, c, d, e, f = map(int, input().split(' '))
want = -1
listSticks = [a, b, c, d, e, f]
for value in listSticks:
    if listSticks.count(value)>= 4:
        want = value
if want>0:
    listSticks = list(set(listSticks))
    listSticks.remove(value)
    if (len(listSticks) <= 1):
        print("Elephant")
    else:
        print("Bear")
else:
    print("Alien")

# ===============================
# (c) MidAndFeed aka ASilentVoice
# ===============================
import math, fractions
# ===============================
q = [int(x) for x in input().split()]
sq = set(q)
if len(sq) > 3:
	print("Alien")
else:
	if len(sq) == 3:
		print("Bear")
	else:
		for x in sq:
			if q.count(x) > 4:
				print("Bear")
				break
			else:
				print("Elephant")
				break

inp=raw_input()
arr=[int(i) for i in inp.split()]
k=False
for i in range(len(arr)):
    c=0
    for j in range(len(arr)):
        if arr[i]==arr[j]:
            c+=1
    if c==4:
        k=True
        break
if k:
    left=filter(lambda x:x!=arr[i],arr)
    if len(set(left))==2:
        print "Bear"
    if len(set(left))==1:
        print "Elephant"
else:
    print "Alien"

mylist = list(map(int, input().split()))
myset = list(set(mylist))
flag = 0
elephant = 0
for i in range(0, len(myset)):
    if(mylist.count(myset[i]) == 4):
        flag = 1
    if(mylist.count(myset[i]) == 2):
        elephant = 1
if flag == 0:
    print("Alien")
else:
    if(elephant == 1):
        print("Elephant")
    else:
        print("Bear")

cifre = raw_input().split(" ")
c = [0 for i in range(9)]

for i in range(6):
    c[int(cifre[i]) - 1] += 1

print(c)

elephant = False
alien = True
for i in range(9):
    if(c[i] == 2 or c[i] == 6):
        elephant = True
    if(c[i] >= 4):
        alien = False

if(alien):
    print("Alien")
elif(elephant):
    print("Elephant")
else:
    print("Bear")

list = list(map(int, input().split(" ")))
list.sort()
count=1
index =[]
list.insert(0,-1)
for i in range(len(list)-1):
    if list[i]==list[i+1]:
        count = count+1
if count==4:
    print("Bear")
elif count==5:
    print('Elephant')
else:
    print('Alien')

from __future__ import division
from collections import Counter as ctr
from math import ceil, log, factorial, sqrt
# reads a line of input and converts into a list of ints
# 1 1 3 => [1, 1, 3]
def rl():
    return [int(i) for i in raw_input().split()]

# reads n lines of input (if n defined) and returns a list of strings
# where each element is a line in the input
# abc
# abcdef
# => ['abc', 'abcdef']
# if n not defined, read first line to get number of lines
# 2
# abc
# abcdef
# => ['abc', 'abcdef']
def rm(n=None):
    if n is None:
        n = input()
    return [raw_input() for i in range(n)]

# same as rm, except converts each line to a list of ints like rl
def rlm(n=None):
    if n is None:
        n = input()
    return [rl() for i in range(n)]

def yn(b):
    if b:
        print "YES"
    else:
        print "NO"

sticks = ctr(rl()).values()
if len(sticks) == 2 and 2 in sticks and 4 in sticks:
    print 'Elephant'
elif len(sticks) == 3 and 4 in sticks and 1 in sticks:
    print 'Bear'
else:
    print 'Alien'

f=input()
f=f.split(" ")
f.sort()
check1=False
check2=False
check3=False
i=0
while i<6:
    if f.count(f[i])==4:
        i+=4
        check1=True
    elif f.count(f[i])==2:
        check2=True
        i+=2
    elif f.count(f[0])==1:
        check3=True
        i+=1
    else:
        break
if check1:
    if check2:
        print("Elephant")
    elif check3:
        print("Bear")
else:
    print("Alien")

l=list(map(int,input().split()))
l.sort()
dic={}
for i in l:
    if dic.get(i):
        dic[i]+=1
    else:
        dic[i]=1
key=list(dic.keys())
#print(key)
if len(key)>3:
    print("Alien")
    exit(0)

elif len(key)==2:
    print("Elephant")
else:
    print("Bear")

from __future__ import division, print_function

def main():
    a = [int(_) for _ in input().split()]
    f = Counter(a)
    size = len(f)
    if size == 3:
        print("Bear")
    elif size == 2 or size == 1:
        print("Elephant")
    else:
        print("Alien")

# PyPy 2 Fast IO
py2 = round(0.5)
if py2:
    from future_builtins import ascii, filter, hex, map, oct, zip
    range = xrange

import os, sys
from io import IOBase, BytesIO

BUFSIZE = 8192
class FastIO(BytesIO):
    newlines = 0

    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None

    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0,2), super(FastIO, self).write(s))[0])
        return s

    def read(self):
        while self._fill(): pass
        return super(FastIO,self).read()

    def readline(self):
        while self.newlines == 0:
            s = self._fill(); self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s:self.buffer.write(s.encode('ascii'))
            self.read = lambda:self.buffer.read().decode('ascii')
            self.readline = lambda:self.buffer.readline().decode('ascii')

sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip('\r\n')

# Importing Modules
import math
import collections

from collections import Counter
from math import fabs

if __name__ == "__main__":
    main()

l1,l2,l3,l4,l5,l6=map(int, input().split())
a=[]
a.append(l1)
a.append(l2)
a.append(l3)
a.append(l4)
a.append(l5)
a.append(l6)
a=sorted(a)
b=0
for i in range(0,2):
    if(a[i]==a[i+4]):
        b=1
        break
    i=i+1
if(len(set(a))>3):
    print("Alien")
elif(len(set(a))==3):
    print("Bear")
elif(len(set(a))==1):
    print("Elephant")
elif(b==0):
    print("Elephant")
else:
    print("Bear")

# MUH and Sticks

l = map(int, raw_input().split())
l1 = set(l)

if len(l1) > 3:
    print 'Alien'
elif len(l1) == 3:
    for item in l1:
        if l.count(item) == 4:
            print 'Bear'
            break
elif len(l1) == 2:
    for item in l1:
        if l.count(item) == 4:
            print 'Elephant'
            break
else:
    print 'Elephant'

list = list(map(int, input().split(" ")))
list.sort()
count=1
index =[]
list.append(-1)

for i in range(len(list)-1):
     count= list.count(list[i])
     if count==1:
         index.append(i)
if len(index)==2 or len(index)==1 :
    print('Bear')
elif len(index)==0:
    print('Elephant')
else:
    print('Alien')

lst=list(map(int,input().split()))
s=set(lst)
if len(s)==2 or len(s)==1:
    print('Elephant')
elif len(s)==3:
    print('Bear')
else:
    print('Alien')

d={}
for i in map(int,input().split()):
	d[i]=d.get(i,0)+1
if not 4 in d.values():
	print("Alien")
else:
	a=[]
	for i in d:
		if d[i]!=4:
			for j in range(d[i]):
				a.append(i)
	if a[0]==a[1]:
		print("Elephant")
	else:
		print("Bear")

l=list(map(int,input().split()))
f=set(l)
cnt=0
for i in f:
  if l.count(i)==4:
    cnt+=1
  elif l.count(i)==2:
    cnt+=1
  else:
    cnt+=0
if cnt==1:
  print("Bear")
elif cnt==2:
  print("Elephant")
else:
  print("Alien")

n=list(map(int,input().split()))
a=len(set(n))
if(a>3):
	print("Alien")
else:
	c=[]
	for i in range(6):
		c.append(n.count(n[i]))
	print(c)
	if(max(c)<4):
		print("Alien")
	elif(c.count(1)==2 or (len(set(c))==2 and n[c.index(max(c))]>n[c.index(min(c))])):
		print("Bear")
	else:
		print("Elephant")

#coding: utf-8
a = map(int, raw_input().split())

count = 0
legs_len = 0

for i in range(len(a)):
	count = 0
	for b in range(len(a)):
		if(a[i] == a[b]):
			count += 1
		if(count == 4):
			break
	if(count == 4):
		legs_len = a[i]
		break

if(count < 4):
	print 'Alien'
	exit()

count = 0
i = 0
index_ref = 0
for i in range(len(a)):
	if(a[i] != legs_len):
		count += 1
		if(count == 2):
			break
		index_ref = i

if((a[index_ref] < a[i]) or (a[i] < a[index_ref])):
	print 'Bear'
elif(a[index_ref] == a[index_ref]):
	print 'Bear'
else:
	print 'Elephant'

a = map(int,raw_input().split())
if a.count(a[0]) <4 and a.count(a[1]) <4 and a.count(a[2]) <4:
    print "Alien"
if a.count (a[0]) >= 4:
    a.remove(a[0])
    a.remove(a[0])
    a.remove(a[0])
    a.remove(a[0])
elif a.count (a[1]) >= 4:
    a.remove(a[1])
    a.remove(a[1])
    a.remove(a[1])
    a.remove(a[1])
elif a.count (a[2]) >= 4:
    a.remove(a[2])
    a.remove(a[2])
    a.remove(a[2])
    a.remove(a[2])
if a[0] == a[1]:
    print "Elephant"
else:
    print "Bear"

#n=int(raw_input())
d=[]
d=map(long, raw_input().split())
mn=min(d)
mn_c=0
mx=max(d)
mx_c=0
av=0
av_c=0
for i in range(6):
    if(d[i]!=mx and d[i]!=mn):
        av=d[i]
        av_c+=1
    if(d[i]==mx):
        mx_c+=1
    if(d[i]==mn):
        mn_c+=1
if(av_c==4 and d.count(av)==4):
    av_c=4
elif(av_c==4 and d.count(av)!=4):
    av_c=6
if(av_c==0 and mx!=mn):
    print "Elephant"
elif(av_c==4):
    print "Bear"
else:
    print "Alien"

lis=list(map(int,input().split()))
s=set()
dict={}
for i in lis:
    if i not in dict:
        dict[i]=1
        s.add(i)
    else:
        dict[i]+=1
if len(s)!=3 and len(s)!=2 and len(s)!=1:
    print('Alien')
elif len(s)==1 and lis.count(lis[0])==6:
    print('Elephant')
else:
    lis2=list(s)
    ele=False
    ani=False
    for i in lis2:
        if lis.count(i)==2:
            ele=True
        if lis.count(i)==4:
            ani=True
    if ani and ele:
        print('Elephant')
    elif ani:
        print('Bear')
    else:
        print('Alien')

sticks_str = raw_input()
sticks = sticks_str.split(" ")

key = [1, 2, 3, 4, 5, 6, 7, 8, 9]
value = [0, 0, 0, 0, 0, 0, 0, 0, 0]
stick_hash = dict(zip(key, value))

for num in sticks:
    n = int(num)
    if n in stick_hash:
        stick_hash[n] += 1
    else:
        stick_hash[n] = 1

if stick_hash[4] == 4 and stick_hash[2] == 1 and stick_hash[5] == 1:
    print "Bear"
elif stick_hash[4] == 4 and stick_hash[5] == 2:
    print "Elephant"
else:
    print "Alien"