
from operator import itemgetter

unsorted=[]
while(True):
    n = input()
    if n:
        l = n.split(',')
        unsorted.append((l[0],l[1],l[2]))
    else:
        break

print(sorted(unsorted,key=itemgetter(0,1,2)))


2329b35873550a6ac8b854415ebd424ef8fc67b1
<mask token>

<mask token>
while True:
    n = input()
    if n:
        l = n.split(',')
        unsorted.append((l[0], l[1], l[2]))
    else:
        break
print(sorted(unsorted, key=itemgetter(0, 1, 2)))

<mask token>
unsorted = []
while True:
    n = input()
    if n:
        l = n.split(',')
        unsorted.append((l[0], l[1], l[2]))
    else:
        break
print(sorted(unsorted, key=itemgetter(0, 1, 2)))

from operator import itemgetter
unsorted = []
while True:
    n = input()
    if n:
        l = n.split(',')
        unsorted.append((l[0], l[1], l[2]))
    else:
        break
print(sorted(unsorted, key=itemgetter(0, 1, 2)))


from operator import itemgetter

unsorted=[]
while(True):
    n = input()
    if n:
        l = n.split(',')
        unsorted.append((l[0],l[1],l[2]))
    else:
        break

print(sorted(unsorted,key=itemgetter(0,1,2)))

