문제 출처: https://www.acmicpc.net/problem/1181
Silver 5
key와 람다를 이용해 정렬하기
if __name__ == '__main__':
N = int(input())
word = []
for i in range(N):
string = input()
word_length = len(string)
word.append((string, word_length))
word = list(set(word))
word.sort(key = lambda w : (w[1], w[0]))
for w in word:
print(w[0])