class Subject:
def __init__(self, math, eng, progm):
self.math = math
self.eng = eng
self.progm = progm
class Student:
def __init__(self, ID, name, gender, age, score):
self.ID = ID
self.name = name
self.gender = gender
self.age = age
self.score = score
self.data = [self.ID, self.name, self.gender, self.age, self.score]
def __iter__(self):
self.current_index = 0
return self
def __next__(self):
if self.current_index < len(self.data):
x = self.data[self.current_index]
self.current_index += 1
return x
raise StopIteration
students = [_ for _ in range(3)]
for i in range(3):
ID, name, gender, age, m, e, p = map(str, input().split())
score = Subject(m, e, p)
students[i] = Student(ID, name, gender, age, score)
for stu in students:
ID, name, gender, age, score = stu
print(ID, name, gender, age, score.math, score.eng, score.progm)