list.sort(key=lambda x:x[0],x[1])
def solution(files):
o_f = []
i = 0
for file_ii in files:
HEAD = ''
NUMBER = ''
f_h = True
for j in range(len(file_ii)):
c = file_ii[j]
if c.isdigit():
NUMBER += c
f_h = False
else:
if not f_h:
break
HEAD += c
o_f.append((HEAD.upper(),int(NUMBER),i))
o_f.sort(key=lambda x:(x[0],x[1]))
i += 1
# print(HEAD)
# print(NUMBER)
# o_f = []
# for i in range(n):
# # print(NUMBER[i][0])
# o_f.append((HEAD[i][0].upper(),int(NUMBER[i][0]),i))
# o_f.sort(key=lambda x:(x[0],x[1]))
s = []
for i in o_f:
s.append(files[i[2]])
return s