import sys

spisok = list(map(str.strip, sys.stdin))

print(spisok)

print(*sorted(spisok, key=lambda x: sum([ord(i) - ord('A') + 1 for i in x.upper()])), sep='\n')

6027a624007392cfd9f06e4aa57c352a8f707e4d
<mask token>

<mask token>
print(spisok)
print(*sorted(spisok, key=lambda x: sum([(ord(i) - ord('A') + 1) for i in x
    .upper()])), sep='\n')

<mask token>
spisok = list(map(str.strip, sys.stdin))
print(spisok)
print(*sorted(spisok, key=lambda x: sum([(ord(i) - ord('A') + 1) for i in x
    .upper()])), sep='\n')

import sys
spisok = list(map(str.strip, sys.stdin))
print(spisok)
print(*sorted(spisok, key=lambda x: sum([(ord(i) - ord('A') + 1) for i in x
    .upper()])), sep='\n')

import sys

spisok = list(map(str.strip, sys.stdin))

print(spisok)

print(*sorted(spisok, key=lambda x: sum([ord(i) - ord('A') + 1 for i in x.upper()])), sep='\n')
