import scala.io.StdIn
 
object Main{
  def main(args:Array[String]){
    val sc=new java.util.Scanner(System.in)
    val n=sc.nextInt
    val a=Array.fill(4,13)(false)
    val map=Map("S"->0,"H"->1,"C"->2,"D"->3)
    for(i<-0 until n){
      val c=map(sc.next)
      val I=sc.nextInt-1
      a(c)(I)=true
    }
    for(i<-0 until 4;j<-0 until 13 if !a(i)(j)){
      if(i==0) println("S "+(j+1))
      if(i==1) println("H "+(j+1))
      if(i==2) println("C "+(j+1))
      if(i==3) println("D "+(j+1))
    }
  }
}