n = int(input())
a = [input() for _ in range(n)]

l = []
for s in ['S', 'H', 'C', 'D']:
    for i in range(1, 14):
        l.append(s + ' ' + str(i))

for i in range(n):
    l.remove(a[i])

if l:print(*l, sep='\n')
