ary1 = []
n = gets.to_i
n.times do
    a = gets.split.map(&:to_s)
    ary1 << a
end

ary2 = []
["S","H","C","D"].each do |mark|
    (1..13).each do |i|
        arr = [mark, i.to_s]
        ary2 << arr
    end
end
ary3 = ary2 - ary1
ary3.each do |arr|
    puts arr[0] +" "+ arr[1]
end

