Read problems statements in Mandarin chinese, Russian and Vietnamese as well. 

Chef has obtained the results of a past Cook-Off. He wants to estimate the skill level of each contestant. The contestants can be classified with high probability (w.h.p.) based on the number of solved problems:

A contestant that solved exactly 0 problems is a beginner.
A contestant that solved exactly 1 problem is a junior developer.
A contestant that solved exactly 2 problems is a middle developer.
A contestant that solved exactly 3 problems is a senior developer.
A contestant that solved exactly 4 problems is a hacker.
A contestant that solved all five problems is Jeff Dean.

Please help Chef to identify the programming level of each participant. 

------ Input ------ 

The first line of the input contains a single integer N denoting the number of competitors.
N lines follow. The i-th of these lines contains five space-separated integers A_{i, 1}, A_{i, 2}, A_{i, 3}, A_{i, 4}, A_{i, 5}. The j-th of these integers (1 ≤ j ≤ 5) is 1 if the i-th contestant solved the j-th problem and 0 otherwise.

------ Output ------ 

For each participant, print a single line containing one string denoting Chef's classification of that contestant — one of the strings "Beginner", "Junior Developer", "Middle Developer", "Senior Developer", "Hacker", "Jeff Dean" (without quotes).

------ Constraints ------ 

$1 ≤ N ≤ 5000$
$0 ≤ A_{i, j} ≤ 1 for each valid i, j$

----- Sample Input 1 ------ 
7
0 0 0 0 0
0 1 0 1 0
0 0 1 0 0
1 1 1 1 1
0 1 1 1 0
0 1 1 1 1
1 1 1 1 0
----- Sample Output 1 ------ 
Beginner
Middle Developer
Junior Developer
Jeff Dean
Senior Developer
Hacker
Hacker
----- explanation 1 ------ 
The first contestant has no solved problems, therefore he is a beginner. The second contestant solved 2 problems (the second and fourth problem), therefore he has the skills of a middle developer. The third contestant solved 1 problem, therefore he's at the expected level of a junior developer. The fourth contestant solved 5 problems — we can guess it was Jeff Dean. The fifth contestant solved 3 problems, so he is a senior developer. And the last two contestants should be hackers because they solved exactly 4 problems each.

Difficulty: EASY

Solutions:
n = int(input())
for i in range(n):
	a = list(map(int, input().split()))
	if sum(a) == 0:
		print('Beginner')
	elif sum(a) == 1:
		print('Junior Developer')
	elif sum(a) == 2:
		print('Middle Developer')
	elif sum(a) == 3:
		print('Senior Developer')
	elif sum(a) == 4:
		print('Hacker')
	else:
		print('Jeff Dean')


for i in range(int(input())):
	a = list(map(int, input().split()))
	b = {0: 'Beginner', 1: 'Junior Developer', 2: 'Middle Developer', 3: 'Senior Developer', 4: 'Hacker', 5: 'Jeff Dean'}
	c = sum(a)
	print(b[c])


for testcases in range(int(input())):
	classy = ['Beginner', 'Junior Developer', 'Middle Developer', 'Senior Developer', 'Hacker', 'Jeff Dean']
	level = tuple(map(int, input().split()))
	print(classy[sum(level)])


for _ in range(int(input())):
	g = ['Beginner', 'Junior Developer', 'Middle Developer', 'Senior Developer', 'Hacker', 'Jeff Dean']
	l = [int(i) for i in input().split() if int(i) == 1]
	print(g[len(l)])


lst = ['Beginner', 'Junior Developer', 'Middle Developer', 'Senior Developer', 'Hacker', 'Jeff Dean']
t = int(input())
for i in range(t):
	a = list(input().split())
	c = a.count('1')
	print(lst[c])


for i in range(int(input())):
	(a, b, c, d, e) = map(int, input().split())
	s = a + b + c + d + e
	if s == 0:
		print('Beginner')
	elif s == 1:
		print('Junior Developer')
	elif s == 2:
		print('Middle Developer')
	elif s == 3:
		print('Senior Developer')
	elif s == 4:
		print('Hacker')
	else:
		print('Jeff Dean')


for _ in range(int(input())):
	a = list(map(int, input().split()))
	if a.count(1) == 0:
		print('Beginner')
	elif a.count(1) == 2:
		print('Middle Developer')
	elif a.count(1) == 1:
		print('Junior Developer')
	elif a.count(1) == 3:
		print('Senior Developer')
	elif a.count(1) == 5:
		print('Jeff Dean')
	else:
		print('Hacker')


for i in range(int(input())):
	arr = list(map(int, input().split()))
	c = 0
	for i in arr:
		c = c + i
	if c == 0:
		print('Beginner')
	elif c == 1:
		print('Junior Developer')
	elif c == 2:
		print('Middle Developer')
	elif c == 3:
		print('Senior Developer')
	elif c == 4:
		print('Hacker')
	else:
		print('Jeff Dean')


n = int(input())
for i in range(n):
	m = list(map(int, input().split()))
	haha = m.count(1)
	if haha == 0:
		print('Beginner')
	elif haha == 1:
		print('Junior Developer')
	elif haha == 2:
		print('Middle Developer')
	elif haha == 3:
		print('Senior Developer')
	elif haha == 4:
		print('Hacker')
	elif haha == 5:
		print('Jeff Dean')


for i in range(int(input())):
	x = input().split(' ')
	z = 0
	for j in range(len(x)):
		z += int(x[j])
	if z == 0:
		print('Beginner')
	if z == 1:
		print('Junior Developer')
	if z == 2:
		print('Middle Developer')
	if z == 3:
		print('Senior Developer')
	if z == 4:
		print('Hacker')
	if z == 5:
		print('Jeff Dean')


for _ in range(int(input())):
	l = list(map(int, input().split()))
	if sum(l) == 0:
		print('Beginner')
	elif sum(l) == 1:
		print('Junior Developer')
	elif sum(l) == 2:
		print('Middle Developer')
	elif sum(l) == 3:
		print('Senior Developer')
	elif sum(l) == 4:
		print('Hacker')
	else:
		print('Jeff Dean')


for i in range(int(input())):
	l = [int(x) for x in input().split()]
	c = 0
	for i in l:
		if i == 1:
			c += 1
		else:
			continue
	if c == 0:
		print('Beginner')
	elif c == 1:
		print('Junior Developer')
	elif c == 2:
		print('Middle Developer')
	elif c == 3:
		print('Senior Developer')
	elif c == 4:
		print('Hacker')
	elif c == 5:
		print('Jeff Dean')


for _ in range(int(input())):
	a = list(map(int, input().split()))
	g = {0: 'Beginner', 1: 'Junior Developer', 2: 'Middle Developer', 3: 'Senior Developer', 4: 'Hacker', 5: 'Jeff Dean'}
	for i in range(5):
		t = a.count(1)
	print(g[t])


for _ in range(int(input())):
	a = [int(i) for i in input().split()]
	c = a.count(1)
	if c == 0:
		print('Beginner')
	elif c == 1:
		print('Junior Developer')
	elif c == 2:
		print('Middle Developer')
	elif c == 3:
		print('Senior Developer')
	elif c == 4:
		print('Hacker')
	else:
		print('Jeff Dean')


t = int(input())
for i in range(t):
	a = [int(a) for a in input().split()]
	b = sum(a)
	if b == 5:
		print('Jeff Dean')
	elif b == 4:
		print('Hacker')
	elif b == 3:
		print('Senior Developer')
	elif b == 2:
		print('Middle Developer')
	elif b == 1:
		print('Junior Developer')
	elif b == 0:
		print('Beginner')


N = int(input())
for _ in range(N):
	A = list(map(int, input().split()))
	d = {0: 'Beginner', 1: 'Junior Developer', 2: 'Middle Developer', 3: 'Senior Developer', 4: 'Hacker', 5: 'Jeff Dean'}
	print(d.get(A.count(1)))


for t in range(int(input())):
	t = 0
	(a, b, c, d, e) = map(int, input().split())
	if a == 1:
		t += 1
	if b == 1:
		t += 1
	if c == 1:
		t += 1
	if d == 1:
		t += 1
	if e == 1:
		t += 1
	if t == 5:
		print('Jeff Dean')
	elif t == 4:
		print('Hacker')
	elif t == 3:
		print('Senior Developer')
	elif t == 2:
		print('Middle Developer')
	elif t == 1:
		print('Junior Developer')
	elif t == 0:
		print('Beginner')


n = int(input())
for i in range(n):
	(a, b, c, d, e) = map(int, input().split())
	l = [a, b, c, d, e]
	q = l.count(1)
	if q == 0:
		print('Beginner')
	elif q == 1:
		print('Junior Developer')
	elif q == 2:
		print('Middle Developer')
	elif q == 3:
		print('Senior Developer')
	elif q == 4:
		print('Hacker')
	elif q == 5:
		print('Jeff Dean')
	else:
		print('None')


N = int(input())
Y = 0
for i in range(N):
	(Ai1, Ai2, Ai3, Ai4, Ai5) = map(int, input().split(' '))
	Y = Ai1 + Ai2 + Ai3 + Ai4 + Ai5
	if Y == 0:
		print('Beginner')
	if Y == 1:
		print('Junior Developer')
	if Y == 2:
		print('Middle Developer')
	if Y == 3:
		print('Senior Developer')
	if Y == 4:
		print('Hacker')
	if Y == 5:
		print('Jeff Dean')


for i in range(int(input())):
	n = input()
	if n.count('1') == 0:
		print('Beginner')
	elif n.count('1') == 1:
		print('Junior Developer')
	elif n.count('1') == 2:
		print('Middle Developer')
	elif n.count('1') == 3:
		print('Senior Developer')
	elif n.count('1') == 4:
		print('Hacker')
	else:
		print('Jeff Dean')


q = int(input())
for i in range(q):
	w = list(map(int, input().split()))
	z = 0
	for i in range(len(w)):
		if w[i] == 1:
			z += 1
	if z == 0:
		print('Beginner')
	elif z == 1:
		print('Junior Developer')
	elif z == 2:
		print('Middle Developer')
	elif z == 3:
		print('Senior Developer')
	elif z == 4:
		print('Hacker')
	else:
		print('Jeff Dean')


T = int(input())
for i in range(T):
	Li = list(map(int, input().split()))
	res = sum(Li)
	if res == 0:
		print('Beginner')
	elif res == 1:
		print('Junior Developer')
	elif res == 2:
		print('Middle Developer')
	elif res == 3:
		print('Senior Developer')
	elif res == 4:
		print('Hacker')
	else:
		print('Jeff Dean')


for case in range(int(input())):
	a = list(map(int, input().split(' ')))
	x = sum(a)
	if x == 0:
		print('Beginner')
	elif x == 1:
		print('Junior Developer')
	elif x == 2:
		print('Middle Developer')
	elif x == 3:
		print('Senior Developer')
	elif x == 4:
		print('Hacker')
	elif x == 5:
		print('Jeff Dean')


t = int(input())
for i in range(t):
	l = list(map(int, input().split()[:6]))
	a = l.count(1)
	if a == 0:
		print('Beginner')
	elif a == 1:
		print('Junior Developer')
	elif a == 2:
		print('Middle Developer')
	elif a == 3:
		print('Senior Developer')
	elif a == 4:
		print('Hacker')
	else:
		print('Jeff Dean')


try:
	for _ in range(int(input())):
		L = list(map(int, input().split()))
		if L.count(1) == 0:
			print('Beginner')
		elif L.count(1) == 1:
			print('Junior Developer')
		elif L.count(1) == 2:
			print('Middle Developer')
		elif L.count(1) == 3:
			print('Senior Developer')
		elif L.count(1) == 4:
			print('Hacker')
		else:
			print('Jeff Dean')
except:
	pass


N = int(input())
for _ in range(N):
	A = list(map(int, input().split()))
	count = 0
	for i in A:
		if i == 1:
			count += 1
	if count == 0:
		print('Beginner')
	elif count == 1:
		print('Junior Developer')
	elif count == 2:
		print('Middle Developer')
	elif count == 3:
		print('Senior Developer')
	elif count == 4:
		print('Hacker')
	elif count > 4:
		print('Jeff Dean')


Test = int(input())
for TestCases in range(Test):
	Contestants = list(map(int, input().split()))
	CountOfSolvedProblems = 0
	for values in Contestants:
		if values == 1:
			CountOfSolvedProblems += 1
	if CountOfSolvedProblems == 0:
		print('Beginner')
	elif CountOfSolvedProblems == 1:
		print('Junior Developer')
	elif CountOfSolvedProblems == 2:
		print('Middle Developer')
	elif CountOfSolvedProblems == 3:
		print('Senior Developer')
	elif CountOfSolvedProblems == 4:
		print('Hacker')
	else:
		print('Jeff Dean')


n = int(input())
a = []
dict = {0: 'Beginner', 1: 'Junior Developer', 2: 'Middle Developer', 3: 'Senior Developer', 4: 'Hacker', 5: 'Jeff Dean'}
while n > 0:
	a_temp = list(map(int, input().split()))
	i = 0
	count = 0
	for i in range(5):
		if a_temp[i] == 1:
			count += 1
	print(dict[count])
	n -= 1


for i in range(int(input())):
	lis = ['Beginner', 'Junior Developer', 'Middle Developer', 'Senior Developer', 'Hacker', 'Jeff Dean']
	solved = sum(list(map(int, input().split())))
	print(lis[solved])


try:
	n = int(input())
	for r in range(n):
		a = list(map(int, input().split()))
		sum = a.count(1)
		if sum == 0:
			print('Beginner')
		elif sum == 1:
			print('Junior Developer')
		elif sum == 2:
			print('Middle Developer')
		elif sum == 3:
			print('Senior Developer')
		elif sum == 4:
			print('Hacker')
		elif sum == 5:
			print('Jeff Dean')
except:
	pass


N = int(input())
for i in range(N):
	(A, B, C, D, E) = map(int, input().split())
	S = A + B + C + D + E
	if S == 0:
		print('Beginner')
	elif S == 1:
		print('Junior Developer')
	elif S == 2:
		print('Middle Developer')
	elif S == 3:
		print('Senior Developer')
	elif S == 4:
		print('Hacker')
	else:
		print('Jeff Dean')


for _ in range(int(input())):
	a = list(map(str, input().split()))
	b = 0
	for x in a:
		if '1' in x:
			b += 1
	if b == 0:
		print('Beginner')
	elif b == 1:
		print('Junior Developer')
	elif b == 2:
		print('Middle Developer')
	elif b == 3:
		print('Senior Developer')
	elif b == 4:
		print('Hacker')
	elif b == 5:
		print('Jeff Dean')


t = int(input())
for _ in range(t):
	x = list(map(int, input().split()))
	res = x.count(1)
	if res == 0:
		print('Beginner')
	elif res == 1:
		print('Junior Developer')
	elif res == 2:
		print('Middle Developer')
	elif res == 3:
		print('Senior Developer')
	elif res == 4:
		print('Hacker')
	elif res == 5:
		print('Jeff Dean')


N = int(input())
for i in range(N):
	lst = list(map(int, input().split()))
	a = lst.count(0)
	b = lst.count(1)
	if a == 5:
		print('Beginner')
	elif b == 1:
		print('Junior Developer')
	elif b == 2:
		print('Middle Developer')
	elif b == 3:
		print('Senior Developer')
	elif b == 4:
		print('Hacker')
	elif b == 5:
		print('Jeff Dean')


for _ in range(int(input())):
	l = list(map(int, input().split()))
	s = 0
	for i in l:
		if i == 1:
			s += 1
	if s == 0:
		print('Beginner')
	elif s == 1:
		print('Junior Developer')
	elif s == 2:
		print('Middle Developer')
	elif s == 3:
		print('Senior Developer')
	elif s == 4:
		print('Hacker')
	elif s == 5:
		print('Jeff Dean')