n = input()
data = []
for i in ['H', 'C', 'S', 'D']:
    for j in ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13']:
        data.append(i + j)
for i in range(n):
    data.remove(raw_input())
for i in range(len(data)):
    print data[i]