suits = "SHCD"
cards = [0] * 52

n = int(input())
for _ in range(n):
    l, r = input().split()
    i = suits.find(l)*13 + int(r)-1
    cards[i] = 1;

for i in range(52):
    if cards[i] == 0:
        print("{} {}".format(suits[i//13], i%13+1))

