def student():
name = input()
phone = input()
birth = input()
stdData = {'name':name, 'phone':phone, 'birth':birth}
return stdData
def student2(name, phone, birth):
stdData = {'name':name, 'phone':phone, 'birth':birth}
return stdData
def search(k):
a = 0
while(a<k):
print(listStd[a].get('name'), end='\t' )
print(listStd[a].get('phone'), end='\t' )
print(listStd[a].get('birth') )
a=a+1
k = int(input())
a = 1
if(k>=1):
listStd = [student()]
while(a<k):
listStd.append(student())
a = a+1
while(True):
p = int(input("Input choice :"))
if(p==1):
listStd.append(student())
k=k+1
elif(p==2):
q=input()
if(q=='name'):
w=input()
for i in range(k):
if(w==listStd[i].get('name')):
del listStd[i]
k=k-1
break
elif(q=='phone'):
w=input()
for i in range(k):
if(w==listStd[i].get('phone')):
del listStd[i]
k=k-1
break
elif(q=='birth'):
w=input()
for i in range(k):
if(w==listStd[i].get('birth')):
del listStd[i]
k=k-1
break
elif(p==3):
search(k)
elif(p==4):
w = input()
for i in range(k):
if(w==listStd[i].get('name') or w==listStd[i].get('phone') or w==listStd[i].get('birth')):
print(listStd[i].get('name'), end='\t' )
print(listStd[i].get('phone'), end='\t' )
print(listStd[i].get('birth') )
elif(p==5):
print("1.name 2.phone 3.birth")
b=int(input())
if(b==1):
w = input()
print(b)
print(w)
for i in range(k):
if(w==listStd[i].get('name')):
print(listStd[i], end='\t' )
phone1=listStd[i].get('phone')
birth1=listStd[i].get('birth')
name = input()
listStd.append(student2(name, phone1, birth1))
del listStd[i]
break
elif(b==2):
w = input()
for i in range(k):
if(w==listStd[i].get('phone')):
print(listStd[i], end='\t' )
name1=listStd[i].get('name')
birth2=listStd[i].get('birth')
phone = input()
listStd.append(student2(name1, phone, birth2))
del listStd[i]
break
elif(b==3):
w = input()
for i in range(k):
if(w==listStd[i].get('birth')):
print(listStd[i], end='\t' )
name2=listStd[i].get('name')
phone2=listStd[i].get('phone')
birth=input()
listStd.append(student2(name2, phone2, birth))
del listStd[i]
break
1.추가 2.삭제 3.전체 출력 4.검색 5.수정