n = input()
a = []
for i in range(n):
    a.append(raw_input())
for j in range(1,14):
    if ['S', str(j)] not in a == True:
        print ' '.join(['S', str(j)])
for j in range(1,14):
    if ['H', str(j)] not in a == True:
        print ' '.join(['H', str(j)])
for j in range(1,14):
    if ['C', str(j)] not in a == True:
        print ' '.join(['C', str(j)])
for j in range(1,14):
    if ['D', str(j)] not in a == True:
        print ' '.join(['D', str(j)])
    