a = int(input())
cards = [[False for x in range(13)] for y in range(4)]
for i in range(a):
    s, v = map(str, input().split())
    u = int(v)
    if s == 'S':
        cards[0][u-1] = True
    elif s == 'H':
        cards[1][u-1] = True
    elif s == 'C':
        cards[2][u-1] = True
    else:
        cards[3][u-1] = True

for j in range(13):
    if cards[0][j]:
        continue
    else:
        print("S ", j+1)

for j in range(13):
    if cards[1][j]:
        continue
    else:
        print("H ", j+1)

for j in range(13):
    if cards[2][j]:
        continue
    else:
        print("D ", j+1)

for j in range(13):
    if cards[3][j]:
        continue
    else:
        print("C ", j+1)

