import sys
n = int(input())
words = []
for _ in range(n):
    temp = sys.stdin.readline().strip()
    if [len(temp), temp] in words:
        next
    else:
        words.append([len(temp), temp])
words.sort()
for j in range(len(words)):
    print(words[j][1])

3e66b0fa2c0198a29cdbc6085626dc58e1669b15
<mask token>

<mask token>
for _ in range(n):
    temp = sys.stdin.readline().strip()
    if [len(temp), temp] in words:
        next
    else:
        words.append([len(temp), temp])
words.sort()
for j in range(len(words)):
    print(words[j][1])

<mask token>
n = int(input())
words = []
for _ in range(n):
    temp = sys.stdin.readline().strip()
    if [len(temp), temp] in words:
        next
    else:
        words.append([len(temp), temp])
words.sort()
for j in range(len(words)):
    print(words[j][1])

import sys
n = int(input())
words = []
for _ in range(n):
    temp = sys.stdin.readline().strip()
    if [len(temp), temp] in words:
        next
    else:
        words.append([len(temp), temp])
words.sort()
for j in range(len(words)):
    print(words[j][1])
