import java.util.Scanner

fun main(args:Array<String>){

    val cin = Scanner(System.`in`)
    val list = Array(4,{Array<Int>(13,{0})})
    var n = cin.nextInt()

    for(i in 1..n){
    when(cin.next()){
	"S" -> list[0][cin.nextInt()-1] = 1
	"H" -> list[1][cin.nextInt()-1] = 1
	"C" -> list[2][cin.nextInt()-1] = 1
	"D" -> list[3][cin.nextInt()-1] = 1
    }
    }

    for(i in 0..3){
	for(j in 0..12){
	    if(list[i][j] == 0){
		when(i){
		    0 -> println("S ${j+1}")
		    1 -> println("H ${j+1}")
		    2 -> println("C ${j+1}")
		    3 -> println("D ${j+1}")
		}
	    }

	}
    }
    
}

