n = gets.to_i

hash = {}
['S','H','C','D'].each do |suit|
    for rank in 1..13
        key = suit + " " + rank.to_s
        hash[key] = false
    end
end

n.times do
    card = gets.chomp
    hash[card] = true
end

hash.select{|key,val|
    puts key if !val
}