from itertools import combinations people = [input() for _ in range(int(input()))] for a, b in combinations(people, 2): print(f"{a} - {b}")