The provided code stub will read in a dictionary containing key/value pairs of name:[marks] for a list of students.  Print the average of the marks array for the student name provided, showing 2 places after the decimal.  

Example 

$\textbf{marks key:value pairs are}$ 

$\text{'alpha'}:[20,30,40]$ 

$\text{'beta'}:[30,50,70]$ 

$\textbf{query_name}=\textbf{'beta'}$  

The query_name is 'beta'.  beta's average score is $(30+50+70)/3=50.0$.

Input Format

The first line contains the integer $n$, the number of students' records. The next $n$ lines contain the names and marks obtained by a student, each value separated by a space. The final line contains query_name, the name of a student to query.

Constraints

$2\leq n\leq10$  
$0\leq\textit{marks}[i]\leq100$  
$\textbf{length of marks arrays}=3$  

Output Format

Print one line: The average of the marks obtained by the particular student correct to 2 decimal places.

Sample Input 0
3
Krishna 67 68 69
Arjun 70 98 63
Malika 52 56 60
Malika

Sample Output 0
56.00

Explanation 0

Marks for Malika are $\{52,56,60\}$ whose average is $\frac{52+56+60}{3}\Rightarrow56$

Sample Input 1
2
Harsh 25 26.5 28
Anurag 26 28 30
Harsh

Sample Output 1
26.50

Difficulty: EASY

Solutions:
total = int(input())
students = {}
for x in range(total + 1):
	info = input().split()
	key = info[0]
	if key in students:
		print('%.2f' % ((students[key][0] + students[key][1] + students[key][2]) / 3.0))
	else:
		students[info[0]] = [float(info[1]), float(info[2]), float(info[3])]


def get_avg(marks, student):
	return sum(marks[student]) / len(marks[student])

def __starting_point():
	n = int(input())
	student_marks = {}
	for _ in range(n):
		(name, *line) = input().split()
		scores = list(map(float, line))
		student_marks[name] = scores
	query_name = input()
	print('{:.2f}'.format(get_avg(student_marks, query_name)))
__starting_point()


n = int(input())
d = {}
for i in range(n):
	a = input()
	L = a.split(' ')
	d[L[0]] = [L[1], L[2], L[3]]
c = input()
p = (float(d[c][0]) + float(d[c][1]) + float(d[c][2])) / 3
print('%0.2f' % p)


n = int(input())
db = dict()
for i in range(0, n):
	entry = [x for x in input().split()]
	name = entry[0]
	marks = entry[1:]
	db[name] = marks
lookup = input()
print('{0:.2f}'.format(sum([float(x) for x in db[lookup]]) / len(db[lookup])))


data = {}
for _ in range(int(input())):
	(name, *marks) = input().split()
	data[name] = [float(m) for m in marks]
marks = data[input()]
print('%.2f' % (sum(marks) / len(marks)))


n = int(input())
res_dict = {}
for i in range(n):
	(dict_key, maths_val, physics_val, chemistry_val) = [item for item in input().strip().split()]
	val = (float(maths_val) + float(physics_val) + float(chemistry_val)) / 3
	res_dict[dict_key] = val
input_key = input().strip()
print('{:.2f}'.format(res_dict[input_key]))


n = int(input())
a = dict()
ans = dict()
for i in range(0, n):
	s = input().split(' ')
	name = s[0]
	ans[name] = 0
	for j in range(1, len(s)):
		ans[name] = ans[name] + float(s[j])
	ans[name] = ans[name] / (len(s) - 1)
name = input()
print('{:0.2f}'.format(ans[name]))


import sys
if sys.version_info[0] >= 3:
	raw_input = input
	from functools import reduce
h = {}
N = int(raw_input())
for i in range(N):
	a = raw_input().split()
	h[a[0]] = reduce(lambda x, y: x + y, [float(e) for e in a[1:]])
print('%.2f' % (h[raw_input().rstrip()] / 3))


N = input()
map = {}
for i in range(0, int(N)):
	S = input().split()
	lst = (float(S[1]) + float(S[2]) + float(S[3])) / 3.0
	map[S[0]] = lst
print('%0.2f' % map[input()])


n = int(input())
register = {}
for i in range(0, n):
	(name, phy, che, math) = list(input().split())
	phy = float(phy)
	che = float(che)
	math = float(math)
	register[name] = (phy + che + math) / 3
oname = input()
print('{:.2f}'.format(register[oname]))


n = int(input())
marklist = {}
for x in range(n):
	list = input().split()
	marklist[list[0]] = list[1:]
name = input().strip()
ans = '{:.2f}'.format(sum([float(x) for x in marklist[name]]) / 3)
print(ans)


d = {}
num = int(input())
for i in range(num):
	data = input().split()
	d[data[0]] = []
	for i in data[1:]:
		d[data[0]].append(eval(i))
i = input()
avg = float(sum(d[i]) / len(d[i]))
print('{0:.2f}'.format(avg))


tt = input()
tt.rstrip()
tt = int(tt)
dic = {}
while tt > 0:
	info = input()
	info.rstrip()
	info_list = info.split()
	dic[info_list[0]] = [info_list[1], info_list[2], info_list[3]]
	tt = tt - 1
query = input()
query.rstrip()
average = (float(dic[query][0]) + float(dic[query][1]) + float(dic[query][2])) / 3
print('%.2f' % average)


t = input()
t.rstrip()
t = int(t)
dic = {}
while t > 0:
	info = input()
	info.rstrip()
	info_list = info.split()
	dic[info_list[0]] = [info_list[1], info_list[2], info_list[3]]
	t = t - 1
query = input()
query.rstrip()
average = (float(dic[query][0]) + float(dic[query][1]) + float(dic[query][2])) / 3
print('%.2f' % average)


test = int(input())
a = {}
for r in range(0, test):
	s = input().split()
	a[s[0]] = list(map(float, s[1:]))
name = input()
ans = sum(a[name]) / 3
print('%.2f' % ans)


t = int(input())
l = []
for i in range(t):
	l.append(input())
name = input()
for i in l:
	if name in i:
		a = i.split()
		q = 0.0
		for x in range(1, 4):
			q += float(a[x])
		print('{0:.2f}'.format(q / 3.0))
		break


import decimal
N = int(input())
d = {}
for i in range(0, N):
	l = input().split()
	d[l[0]] = [float(x) for x in l[1:]]
name = input()
output = sum(d[name]) / float(3)
d = decimal.Decimal
TP = d(10) ** (-2)
print(d(output).quantize(TP))


plants = {}
t = int(input())
while t > 0:
	(str, a, b, c) = input().split(' ')
	a = float(a)
	b = float(b)
	c = float(c)
	marks = float(a + b + c) / 3.0
	plants[str] = marks
	t -= 1
str = input()
if str in plants:
	print('%.2f' % plants.get(str))


cases = int(input())
a = {}
for i in range(0, cases):
	n = input().split()
	m = 0
	for i in range(1, len(n)):
		m = m + float(n[i])
	avg = float(m) / float(len(n) - 1)
	a[n[0]] = float(avg)
name = input()
if name in a:
	print(format(a[name], '.2f'))


N = int(input())
stud_dict = dict()
for i in range(N):
	tmp = input().split(' ')
	name = tmp[0]
	stud_dict[name] = (float(tmp[1]), float(tmp[2]), float(tmp[3]))
name = input()
print('%.2f' % (sum(stud_dict[name]) / 3.0))


n = int(input())
students = {}
for i in range(n):
	inp = input().split()
	students[inp[0]] = (float(inp[1]) + float(inp[2]) + float(inp[3])) / 3
s = input()
print('%.2f' % students[s])


n = int(input())
x = {}
for i in range(0, n):
	b = input().split(' ')
	name = b[0]
	s = 0
	for j in range(1, 4):
		s += float(b[j])
	x[name] = s / 3
name = input()
print('%.2f' % x[name])


from sys import stdin
__author__ = 'serbay'

def average(l):
	return sum(l) / len(l)
N = int(stdin.readline())
students = {}
for i in range(1, N + 1):
	line = stdin.readline()
	(name, *grades) = line.split()
	grades = [float(grade) for grade in grades]
	students[name] = grades
name = stdin.readline().rstrip()
avg = average(students.get(name))
print('%0.2f' % avg)


n = int(input())
students = {}
for _ in range(n):
	row = input().split()
	(name, marks) = (row[0], [float(x) for x in row[1:]])
	students[name] = marks
name = input()
total = float(sum(students[name]))
num_marks = len(students[name])
print('{0:.2f}'.format(total / num_marks))


def main():
	n = int(input())
	st = {}
	while n != 0:
		n = n - 1
		(name, a, b, c) = input().split(' ')
		m = [a, b, c]
		m = [float(i) for i in m]
		st[name] = m
	k = input()
	m = st[k]
	ans = sum(m) / len(m)
	print('%.2f' % ans)
main()


numOfEntries = int(input())
dict = {}
for _ in range(numOfEntries):
	(name, *scores) = input().split()
	dict[name] = sum(list(map(float, scores))) / 3
name = input()
print('%.2f' % dict[name])


import sys
next(sys.stdin)
marks = {}
for line in sys.stdin:
	line = line.strip().split()
	if len(line) > 1:
		marks[line[0]] = sum([float(c) for c in line[1:]]) / len(line[1:])
print('%.2f' % marks[line[0]])


num = int(input())
records = {}
for i in range(num):
	(name, *grades) = input().split()
	grades = tuple((float(grade) for grade in grades))
	records[name] = grades
student = input()
two_decimal_grade = '%.2f' % (sum(records[student]) / len(records[student]))
print(two_decimal_grade)


def main():
	n = int(input())
	students = {}
	while n != 0:
		n = n - 1
		(name, a, b, c) = [inp for inp in input().split(' ')]
		marks = [a, b, c]
		marks = [float(mark) for mark in marks]
		students[name] = marks
	key = input()
	marks = students[key]
	avg = sum(marks) / len(marks)
	print('%.2f' % avg)
main()


n = int(input())
marking = {}
for i in range(0, n):
	sum = 0
	(name, math, phy, chem) = input().split()
	sum = float(math) + float(phy) + float(chem)
	t = sum / 3
	marking[name] = t
name = input()
print('%.2f' % marking[name])


n = int(input())
students = {}
for i in range(n):
	(name, *marks) = input().split()
	students[name] = marks
student = input()
lst = list(map(float, students[student]))
print('{:.2f}'.format(sum(lst) / len(lst)))


students = {}
for n in range(0, int(input())):
	marks = input().split(' ')
	students[marks[0]] = (float(marks[1]) + float(marks[2]) + float(marks[3])) / 3
print('%.2f' % students[input()])


N = int(input())
marks = 3
temp = []
students = {}
while N > 0:
	temp = [x for x in input().split()]
	sum = 0
	for mar in range(1, marks + 1):
		sum += float(temp[mar])
	students[temp[0]] = sum / marks
	N -= 1
name = input()
print('%.2f' % students[name])


from collections import defaultdict
students = defaultdict(list)
n = int(input())
for _ in range(n):
	values = input().split()
	students[values[0]].extend([float(x) for x in values[1:]])
person = input()
print('%0.2f' % round(sum(students[person]) / len(students[person]), 2))


d = {}
for i in range(int(input())):
	l = input().split()
	d[l[0]] = list(map(float, l[1:]))
val = d[input()]
print('{0:0.2f}'.format(sum(val) / len(val)))


n = int(input())
score = {}
for i in range(n):
	(name, x, y, z) = (_ for _ in input().split())
	score[name] = (float(_) for _ in (x, y, z))
name = input()
total = sum(score[name])
print('%.2f' % (total / 3))


n = int(input())
students = {}
while n > 0:
	n -= 1
	line = input().split()
	student = line[0]
	marks = [float(x) for x in line[1:]]
	students[student] = marks
name = input()
print(format(sum(students[name]) / len(students[name]), '.2f'))


n = int(input())
ar = {}
for i in range(0, n):
	s = input()
	ss = s.split(' ')
	n = ss[0]
	m1 = float(ss[1])
	m2 = float(ss[2])
	m3 = float(ss[3])
	m_avg = (m1 + m2 + m3) / 3.0
	ar[n] = '%.2f' % m_avg
s_name = input()
print(ar[s_name])


t = int(input())
d = {}
while t:
	s = input().split()
	x = len(s)
	c = 0.0
	for i in range(1, x):
		c += float(s[i])
	d[s[0]] = c / (x - 1)
	t -= 1
l = input()
print('%.2f' % d[l])


rowcount = int(input())
dicd = {}
for ipt in range(rowcount):
	tline = input().split()
	dicd[tline[0]] = sum(map(float, tline[1:4])) / 3
dkey = input()
print('{0:.2f}'.format(dicd[dkey]))


n = int(input())
a = {}
for i in range(n):
	s = input().split()
	a[s[0]] = [float(x) for x in s[1:]]
q = input()
print('%.2f' % (sum(a[q]) / len(a[q])))


N = int(input())
record = {}
for n in range(N):
	(name, *marks) = input().split()
	record[name] = sum(map(float, marks)) / len(marks)
print('%.2f' % record[input()])


myArray = {}
n = int(input())
i = 0
while i < n:
	strng = input()
	lst = strng.split()
	sum = float(lst[1]) + float(lst[2]) + float(lst[3])
	avg = sum / 3.0
	myArray[lst[0]] = avg
	i = i + 1
strng = input()
out = float(myArray[strng])
newstr = '%.2f' % out
print(newstr)


from sys import stdin
from math import fsum
foo = {}
for i in range(int(stdin.readline())):
	l = stdin.readline().rstrip().split(' ')
	foo[l[0]] = l[1:]
choice = stdin.readline().rstrip()
if choice in foo:
	print('%.2f' % (fsum(list(map(float, foo[choice]))) / 3.0))


n = int(input())
dic = {}
for i in range(n):
	rec = input().split()
	dic[rec[0]] = sum(list(map(float, rec[1:]))) / 3
print('%.2f' % dic[input()])


N = int(input())
studict = {}
for student in range(N):
	inp = input().split(' ')
	studict[inp[0]] = map(float, inp[1:])
name = input()
if studict[name]:
	print('%.2f' % (sum(studict[name]) / 3))


n = int(input())
dict = {'': 0}
for i in range(0, n):
	student = input().split(' ')
	name = student[0]
	avg = (float(student[1]) + float(student[2]) + float(student[3])) / 3.0
	dict[name] = avg
name = input()
print('%.2f' % dict[name])


def average(marks):
	return sum(marks) / 3
n = int(input())
dic = dict()
for _ in range(n):
	(name, a, b, c) = input().split()
	(a, b, c) = (float(a), float(b), float(c))
	dic[name] = (a, b, c)
name = input()
print('%.2f' % average(dic[name]))


dict = {}
t = int(input())
for i in range(t):
	strr = input()
	arr = strr.split()
	dict[arr[0]] = (float(arr[1]) + float(arr[2]) + float(arr[3])) / 3
name = input()
if name in dict:
	print('{0:.2f}'.format(dict[name]))


xs = {}
for _ in range(int(input())):
	line = input().split()
	xs[line[0]] = sum([float(i) for i in line[1:]]) / 3
print('%.2f' % xs[input()])


N = int(input())
studentMarks = {}
for i in range(N):
	(name, math, physics, chem) = input().split()
	avgMark = (float(math) + float(physics) + float(chem)) / 3
	studentMarks[name] = avgMark
requestName = input()
print('{0:.2f}'.format(round(studentMarks[requestName], 2)))


n = int(input())
d = {}
for i in range(n):
	s = input().split()
	d[s[0]] = sum(map(float, s[1:])) / 3
print('{:.2f}'.format(d[input()]))


N = int(input())
S = {}
for _ in range(N):
	s = input().split()
	S[s[0]] = list(map(float, s[1:]))
s = S[input()]
print('%.2f' % (sum(s) / len(s)))


mp = {}
n = int(input())
for i in range(0, n):
	line = input()
	[str, a, b, c] = line.split(' ')
	a = float(a)
	b = float(b)
	c = float(c)
	mp[str] = (a + b + c) / 3.0
str = input()
print('%.2f' % mp[str])


n = int(input())
score = {}
for i in range(n):
	line = input().split()
	name = line[0]
	a = float(line[1])
	b = float(line[2])
	c = float(line[3])
	score[name] = (a + b + c) / 3
name = input()
print('%.2f' % score[name])


students = {}
grades = []
n_students = int(input())
for i in range(n_students):
	student = input().split(' ')
	if student:
		if student[0] not in students:
			students[student[0]] = []
		grades = [float(grade) for grade in student[1:]]
		students[student[0]].extend(grades)
student = input()
if student in students:
	print('{0:.2f}'.format(sum(students[student]) / len(students[student])))


from sys import stdin
from collections import defaultdict
mean = lambda marks: sum(map(float, marks)) / len(marks)

def main():
	records = defaultdict(float)
	num_students = int(stdin.readline())
	for stud in range(num_students):
		(student_name, *marks) = stdin.readline().split()
		records[student_name] = mean(marks)
	print('{:0.2f}'.format(records[stdin.readline().rstrip()]))
main()


n = int(input())
students = {}
while n > 0:
	(name, marks) = input().split(maxsplit=1)
	marks = [float(x) for x in marks.split()]
	students[name] = marks
	n -= 1
req = input()
print('%.2f' % (sum(students[req]) / len(students[req])))


n = input()
file = {}
while int(n) > 0:
	inp = input()
	(nm, a, b, c) = inp.split(' ')
	av = float(a) + float(b) + float(c)
	av = float(av) / 3
	file[nm] = av
	n = int(n) - 1
s = input()
if s in file:
	print('%.2f' % file[s])


n = int(input())
x = {}
from decimal import Decimal
for i in range(n):
	l = ['0', '0', '0']
	sn = input()
	(name, l[0], l[1], l[2]) = sn.split(' ')
	a = Decimal(str((float(l[0]) + float(l[1]) + float(l[2])) / 3)).quantize(Decimal('0.01'))
	x.update({name: a})
nm = input()
print(x[nm])


tests = int(input())
results = dict()
for _ in range(tests):
	(x, *y) = input().split()
	y = [float(i) for i in y]
	results[x] = sum(y) / 3
name = input()
print('{0:.2f}'.format(results[name]))


dic = {}
n = int(input())
for t in range(n):
	s = input()
	n = s.split()[0]
	perc = sum(list(map(float, s.split()[1:]))) / (len(s.split()) - 1)
	dic[n] = perc
n = input()
print('{:.2f}'.format(dic[n]))


t = int(input())
dic = {}
fp = float(0)
for i in range(0, t):
	s = input()
	(cn, m1, m2, m3) = s.split(' ')
	ans = float(m1) + float(m2) + float(m3)
	fp = float(ans / 3)
	dic[cn] = fp
se = input()
print('%.2f' % dic[se])


n = int(input())
x = {}
for _ in range(n):
	(name, a, b, c) = input().split(' ')
	z = {name: [a, b, c]}
	x.update(z)
l = input()
print('%.2f' % float((float(x[l][0]) + float(x[l][1]) + float(x[l][2])) / 3))


n = int(input())
dict = {}
for i in range(n):
	s1 = input()
	s2 = s1.split(' ')
	dict[s2[0]] = float(s2[1]) + float(s2[2]) + float(s2[3])
s = input()
a = format(dict[s] / 3, '.2f')
print(a)


n = int(input())
i = 0
dicti = {}
while i < n:
	str = input()
	list1 = str.split()
	dicti[list1[0]] = [float(list1[1]), float(list1[2]), float(list1[3])]
	i = i + 1
na = input()
ans = (dicti[na][0] + dicti[na][1] + dicti[na][2]) / 3
print('{:.2f}'.format(ans))


a = int(input())
b = {}
while a > 0:
	c = input().split()
	b[c[0]] = (float(c[1]) + float(c[2]) + float(c[3])) / 3
	a -= 1
k = input()
print('{0:.2f}'.format(b[k]))


import sys
data = [x for x in sys.stdin.read().strip().split()]
j = 0
for i in range(len(data) - 1):
	if data[len(data) - 1] == data[i]:
		break
	i += 1
	j += 1
num1 = float(data[j + 1])
num2 = float(data[j + 2])
num3 = float(data[j + 3])
ans = num1 + num2 + num3
ans /= 3
print('{0:.2f}'.format(ans))


from sys import stdin
T = int(stdin.readline())
d = {}
for t in range(T):
	(name, m, p, c) = stdin.readline().rstrip('\n').split(' ')
	d[name] = (float(m) + float(p) + float(c)) / 3
print('{0:0.2f}'.format(d.get(stdin.readline().rstrip('\n'), -1)))


def sumit(a):
	s = 0
	for i in a:
		s = s + float(i)
	return s
n = int(input())
d = dict()
(s, per) = (0, [])
for i in range(n):
	name = input().split()
	d[name[0]] = sumit(name[1:]) / 3
na = input()
print('{0:.2f}'.format(d[na]))


s_num = input()
num_students = int(s_num)
score = dict()
for i in range(num_students):
	s_line = input()
	line = s_line.split()
	score[line[0]] = [float(s) for s in line[1:]]
name = input()
avg_score = sum(score[name]) / len(score[name])
print('%.2f' % avg_score)


students = int(input())
studentdict = {}
for student in range(students):
	info = input().split()
	studentdict[info[0]] = []
	for grade in info[1:]:
		studentdict[info[0]].append(float(grade))
student = input()
print('%.2f' % (sum(studentdict[student]) / len(studentdict[student])))


n = int(input())
a = {}
for i in range(n):
	inp = input().split()
	a[inp[0]] = (float(inp[1]) + float(inp[2]) + float(inp[3])) / 3
query = input()
from decimal import Decimal
print(Decimal(str(a[query])).quantize(Decimal('0.01')))


marks = {}
for _ in range(int(input())):
	row = input().split()
	marks[row[0]] = sum((float(el) for el in row[1:])) / 3.0
print('{:.2f}'.format(marks[input()]))


N = int(input())
dct = {}
for n in range(N):
	lst = input().split()
	name = lst[0]
	avgMrk = (float(lst[1]) + float(lst[2]) + float(lst[3])) / 3
	dct.update({name: avgMrk})
name = input()
print('%.2f' % dct[name])


N = int(input())
hash = {'342': 0.0}
while N > 0:
	inp = input().split()
	marks = float(inp[1]) + float(inp[2]) + float(inp[3])
	marks /= 3.0
	hash[inp[0]] = marks
	N = N - 1
name = input()
print('%.2f' % hash[name])


numOfStudents = input()
dictionary = {}
for i in range(int(numOfStudents)):
	r = input()
	record = r.split()
	marks = list(map(float, record[1:]))
	dictionary[record[0]] = marks
name = input()
marksList = dictionary.get(name)
add = 0
for i in marksList:
	add = add + i
average = add / 3
print('%0.2f' % average)


results = dict()
for _ in range(0, int(input())):
	student = input().split(' ')
	results[student[0]] = [float(x) for x in student[1:]]
selectedResult = results[input()]
print('%.2f' % (sum(selectedResult) / len(selectedResult)))


n = int(input())
d = {}
for i in range(n):
	line = input().split(' ', 1)
	sum = 0
	for s in line[1].split():
		sum += float(s)
	d[line[0]] = sum / len(line[1].split())
while True:
	try:
		line = input()
	except EOFError:
		break
	print('%0.2f' % d[line])


numTrials = int(input())
items = []
for i in range(numTrials + 1):
	s = input()
	items.append(s)
student = items[-1]
items = items[:-1]
for i in range(len(items)):
	items[i] = items[i].split()
D = {}

def sumstr(s):
	total = 0
	for i in s:
		total += float(i)
	return total / len(s)
for i in items:
	D[i[0]] = sumstr(i[1:])
print('%.2f' % D[student])


def mean(l):
	return sum(l) / len(l)
marks = dict()
for x in range(int(input())):
	tokens = input().split()
	marks[tokens[0]] = mean([float(i) for i in tokens[1:]])
print('%.2f' % marks[input()])


t = int(input())
d = {}
mynames = []
mymarks = []
while t > 0:
	t = t - 1
	(s, m, p, c) = input().split()
	avg = float((float(m) + float(p) + float(c)) / 3)
	mynames.append(s)
	mymarks.append(avg)
d = dict(zip(mynames, mymarks))
name = input()
if name in d:
	print('%.2f' % d[name])


t = input()
t = int(t)
i = 0
d = {}
while i < t:
	(name, mat, phy, chem) = input().split()
	mat = float(mat)
	phy = float(phy)
	chem = float(chem)
	d[name] = (mat, phy, chem)
	i += 1
str = input()
num = d[str][0] + d[str][1] + d[str][2]
num = num / 3
print('%.2f' % num)


n = int(input())
d = [0] * n
for i in range(n):
	s = input()
	s = s.split()
	d[i] = s
j = input()
for i in range(n):
	if j == d[i][0]:
		x = (float(d[i][1]) + float(d[i][2]) + float(d[i][3])) / 3
		print('%.2f' % x)


numberofstudents = int(input())
stud = {}
for i in range(0, numberofstudents):
	ip = input()
	ips = ip.split(' ')
	stud[ips[0]] = []
	stud[ips[0]].append(ips[1])
	stud[ips[0]].append(ips[2])
	stud[ips[0]].append(ips[3])
studname = input()
total = float(stud[studname][0]) + float(stud[studname][1]) + float(stud[studname][2])
avg = total / 3
print('%.2f' % avg)


N = int(input())
D = {}
for i in range(N):
	(Name, A, B, C) = input().split()
	A = float(A)
	B = float(B)
	C = float(C)
	D[Name] = (A + B + C) / 3
print('%.2f' % D[input()])


n = int(input())
simpan = {}
for i in range(n):
	(name, math, physic, chemistry) = input().split()
	math = float(math)
	physic = float(physic)
	chemistry = float(chemistry)
	simpan[name] = (math + physic + chemistry) / 3.0
name = input()
print('%.2f' % simpan[name])


a = dict()
for i in range(int(input())):
	inp = input().split()
	a[inp[0]] = sum((float(b) for b in inp[1:])) / 3
print('%.2f' % a[input()])


import sys

class Marks:

	def __init__(self, first_mark, second_mark, third_mark):
		self.mark1 = first_mark
		self.mark2 = second_mark
		self.mark3 = third_mark

	def compute_average(self):
		return '{0:.2f}'.format((self.mark1 + self.mark2 + self.mark3) / 3)
inputStream = sys.stdin
count = int(inputStream.readline())
dictionary = {}
for i in range(0, count):
	text = inputStream.readline()
	words = text.split()
	key = words[0]
	mark1 = float(words[1])
	mark2 = float(words[2])
	mark3 = float(words[3])
	dictionary[key] = Marks(mark1, mark2, mark3)
lastKey = inputStream.readline().split()[0]
print(dictionary[lastKey].compute_average())


n = input()
a = {'': 0}
n = int(n)
while n > 0:
	line = input()
	words = line.split(' ')
	m = words[1]
	p = words[2]
	c = words[3]
	a[words[0]] = (float(m) + float(p) + float(c)) / 3
	n = n - 1
w = input()
if w in a:
	print('%.2f' % a[w])


N = int(input())
student_marks = {}

def average(mark_list):
	n = len(mark_list)
	if n == 0:
		return None
	else:
		return sum(mark_list) / n
for i in range(N):
	inputstr = input()
	(name, *markstrlist) = inputstr.split(' ')
	marklist = [float(m) for m in markstrlist]
	student_marks[name] = marklist
query = None
while query != '':
	try:
		query = input()
		if query in student_marks:
			print('{0:.2f}'.format(average(student_marks[query])))
	except EOFError:
		break


thing = {}
for _ in range(int(input())):
	temp = input().split()
	thing[temp[0]] = '{0:.2f}'.format((float(temp[1]) + float(temp[2]) + float(temp[3])) / 3)
n = input()
if n in thing:
	print(thing[n])


stud_dict = {}

def process(name_marks):
	(name, m, p, c) = map(str, name_marks.split(' '))
	stud_dict[name] = (float(m) + float(p) + float(c)) / 3

def main():
	n = int(input())
	for i in range(n):
		name_mar = input()
		process(name_mar)
	name = input()
	print('{0:.2f}'.format(stud_dict[name]))
main()


n = int(input())
names = {}
while n > 0:
	inputData = input().split(' ')
	names[inputData[0]] = (float(inputData[1]) + float(inputData[2]) + float(inputData[3])) / 3 + 0.0
	n -= 1
name = input()
print('%.2f' % names[name])


import sys

def mean(a):
	a = list(a)
	return sum(a) / len(a)
n = int(next(sys.stdin))
d = {}
for i in range(n):
	(name, *marks) = next(sys.stdin).split()
	d[name] = mean(map(float, marks))
print(format(d[next(sys.stdin).strip()], '.2f'))


n = int(input())
m = dict()
while n:
	(s, l) = input().split(maxsplit=1)
	(a, b, c) = map(float, l.split())
	m[s] = (a + b + c) / 3
	n -= 1
print('{0:.2f}'.format(m[input()]))