n = gets.to_i

s = []
h = []
c = []
d = []

n .times do
    x = gets()
    x = x.split
    if x[0] == "S"
        s[x[1].to_i] = x[1].to_i
    elsif x[0] == "H"
        h[x[1].to_i] = x[1].to_i
    elsif x[0] == "C"
        c[x[1].to_i] = x[1].to_i
    elsif x[0] == "D"
        d[x[1].to_i] = x[1].to_i
    end
end

i = 1
13.times do
unless s.include?(i)
    puts "S" + " " + i.to_s
end
i+=1
end

i = 1
13.times do
unless h.include?(i)
    puts "H" + " " + i.to_s
end
i+=1
end

