#38364: python解法


1257891 (1257891)

學校 : 國立臺灣師範大學附屬高級中學
編號 : 245193
來源 : [122.116.158.21]
最後登入時間 :
2025-08-02 00:39:00

a=int(input())
f=[]
g=[]
h=[]
i=[]
for z in range(a):
    b,c,d,e=map(str,input().split())
    c=int(c)
    d=int(d)
    f.append(c)
    g.append(d)
    h.append(b)
    i.append(e)
for i in list(sorted(zip(f,g,h,i))):
    print(*i[0:3])
    print(i[-1])