d = {"S":[1,2,3,4,5,6,7,8,9,10,11,12,13],
     "H":[1,2,3,4,5,6,7,8,9,10,11,12,13],
     "D":[1,2,3,4,5,6,7,8,9,10,11,12,13],
     "C":[1,2,3,4,5,6,7,8,9,10,11,12,13]}
n = int(input())
for i in range(n):
    N, M = map(str,input().split())
    d[N][int(M)-1] ="None"

for j in range(len(d)):
    if j==1:
        list_d = d["S"]
        c = "S"
    elif j == 2:
        list_d = d["H"]
        c = "H"
    elif j == 3:
        list_d = d["C"]
        c = "C"
    else:
        list_d = d["D"]
        c = "D"
    for i in range(len(list_d)):
        if(list_d[i] != "None"):
            print(c , list_d[i])
